This topic was also discussed during the deprecation of TransactionMiddleware and the introduction of ATOMIC_REQUESTS. The existing middleware semantics can't guarantee that __exit__ (during process_response) will get called no matter what, necessitating the setting that invokes BaseHandler.make_view_atomic. make_view_atomic implements basically what you're suggesting, for one specific case (DB/ORM code in the front controller, ick!).I can't find the previous discussion, does anyone have a link?
Keyword argument to patterns() perhaps?
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/201310162036.05529.shai%40platonix.com.
For more options, visit https://groups.google.com/groups/opt_out.
I think the middlewares have grown a little complicated, and I'd try to avoid
adding functionality there. That said, the feature of universal decoration
seems like it is worthwhile. I'd try to see if it can be added through the
urls mechanism instead -- you'd get behavior that is more like a decorator, in
the sense that decoration would happen only once.
--
You received this message because you are subscribed to a topic in the Google Groups "Django developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/4TnXsONNEso/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/98bd7629-38f1-409e-b2c1-1a058ed3559e%40googlegroups.com.