Running middleware within ATOMIC_REQUESTS transaction
23 views
Skip to first unread message
Marc Aymerich
unread,
Mar 10, 2015, 4:14:01 PM3/10/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-users
Hi,
I have a middleware that performs some operations at the end of each request.
What I have found is that middlewares do not run inside the ATOMIC_REQUESTS transaction. But I want the ATOMIC_REQUESTS transaction to rollback if an exception is being raised on my middleware.
Any idea on how to solve this?
Thanks!
--
Marc
Marc Aymerich
unread,
Mar 10, 2015, 4:16:27 PM3/10/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-users
Well, I supose I can grab the TransactionMiddleware from the previous release and use that instead of ATOMIC_REQUESTS :)