I'm not sure what type of reply or answer you are looking for.

Overhauling Django middleware as discussed on the developers mailing list 
might be best in the long run.
https://groups.google.com/d/topic/django-developers/uW5Ogio8QBc/discussion

On Thursday, August 20, 2015 at 3:54:20 AM UTC-4, guettli wrote:
>
> Sad, not reply since nine days ... 
> Is there something you don't understand? Please ask :-)
>
> Am Dienstag, 11. August 2015 09:24:37 UTC+2 schrieb guettli:
>>
>> I am not happy that settings.ATOMIC_REQUESTS=True isolates only the view, 
>> but not the middlewares
>> in one transaction.
>>
>> For applications like reversion (app which records the changes of a 
>> model) it is very important,
>> that the middleware runs inside the same transaction. If storing the 
>> changes
>> runs in a second transaction, inconsistencies will happen: Model got 
>> updated,
>> but storing the changes in the second transaction might fail.
>>
>> We are in the process of updating our apps to Django 1.8.
>>
>> At the moment our preferred solution:
>>
>>  - set settings.ATOMIC_REQUESTS=False
>>  - Run an own middleware which starts and ends the transaction.
>>
>> Nearly two years ago this kind of Middleware suggested in this list:
>>
>>
>> https://groups.google.com/forum/#!msg/django-users/njeVp4zT5HA/9g0wsFYZKAwJ
>>
>> Related issue for app reversion: 
>> https://github.com/etianen/django-reversion/issues/268
>>
>> What do you think?
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f4d70ee0-217e-4f35-9256-ada86df1d8a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to