On Tue, Mar 10, 2015 at 5:38 PM, Marc Aymerich <glicer...@gmail.com> wrote:
> > > On Tue, Mar 10, 2015 at 5:15 PM, Marc Aymerich <glicer...@gmail.com> > wrote: > >> >> >> On Tue, Mar 10, 2015 at 5:12 PM, Marc Aymerich <glicer...@gmail.com> >> wrote: >> >>> 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? >>> >> >> Well, I supose I can grab the TransactionMiddleware from the previous >> release and use that instead of ATOMIC_REQUESTS :) >> >> >> https://github.com/django/django/blob/stable/1.7.x/django/middleware/transaction.py >> > > > Not that easy, it seems that now all transactions are aborted by the > middleware :( I'll keep looking.... > Stupid mistake, I was loading the wrong module xDD, it works like a charm, sorry for all this noise ;) -- Marc -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. 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/CA%2BDCN_uj9MY7CqWSsP6bV2pDbWkNsc4EstCiBRsgyv%2BUmo4Qcg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.