Before voting for more magic to the transaction middleware, I'd vote
to remove it altogether. Explicit is surely better than implicit in
this case. The admin already uses commit_on_success, etc.
On Oct 18, 1:22 pm, David Winterbottom
<
david.winterbot...@tangentlabs.co.uk> wrote:
> The current implementation of django.middleware.TransactionMiddleware does
> not create a transaction for each database, only the default one
> defined by DEFAULT_DB_ALIAS
> -
https://code.djangoproject.com/browser/django/trunk/django/db/utils.py.
> Shouldn't the middleware manage a transaction for each database defined in
> the DATABASES setting?
>
> I discovered this while debugging some caching issues with the johnnycache
> library, which saves cached querysets when committing. In my case, all
> requests to databases other than default were not being cached.
>
> Happy to supply a patch and tests if this is sensible.
> --
> *Dr. David Winterbottom*