As MIDDLEWARE supports decorator-like objects you could simply add
`django.db.transaction.atomic' to it and you'd get each request wrapped in
a transaction.
Note that this will only start a transaction on the `default` database,
just like the old TransactionMiddleware use to do.
Simon
Le merc
Starting with Django 1.10 you can write a TransactionMiddleware again, and
we will probably ship one again.
On Tuesday, May 10, 2016 at 2:07:30 AM UTC+2, Kevin Tran wrote:
>
> Thomas, did you ever find a solution to your problem? I'm having similar
> thoughts and am looking for an answer.
>
> O
Am Dienstag, 10. Mai 2016 02:07:30 UTC+2 schrieb Kevin Tran:
>
> Thomas, did you ever find a solution to your problem? I'm having similar
> thoughts and am looking for an answer.
>
>
Carl Meyer has worked out an enhancement proposal, here is the
pull-request: https://github.com/django/django/
Thomas, did you ever find a solution to your problem? I'm having similar
thoughts and am looking for an answer.
On Friday, February 6, 2015 at 4:18:53 AM UTC-8, guettli wrote:
>
>
>
> Am 04.02.2015 um 14:04 schrieb Anssi Kääriäinen:
> > I'd really like to be able to define middlewares that actu
Am 04.02.2015 um 14:04 schrieb Anssi Kääriäinen:
I'd really like to be able to define middlewares that actually work in
a well defined and easy to use way. Currently, there is no
guarantee(!) that either process_exception or process_response gets
called after process_request has been called for