[Answer]-Django 1.5 manage.py shell doesn't keep up with database – need to disable caching?

1👍

Sorry, found a related question which solves this:

How to disable Django query cache?

The problem is that (as Peter DeGlopper suggested) Django automatically sets up a transaction, which stops you from seeing new data.

The solution is (from Kekoa’s answer)

from django.db import transaction
transaction.enter_transaction_management()
transaction.commit() # Whenever you want to see new data

👤Alex

Leave a comment