On 10/29/2010 09:58 AM, Russell Keith-Magee wrote:
I agree that it's important to treat people as grown ups. However,
this is something that is trivial to do by accident -- for example,
printing response.content would be an obvious debug step -- and it
will be a non-trivial thing to identify that this is the cause of your
problems.

Aha, I see the point now. On a second thought I think we can avoid this problem altogether by not passing actual response object into middleware. Instead we could pass just those bits that a middleware should care about: a template name and a context instance. The middleware then may (or even must) return new values for those that would be placed back into the response by the request handler.

Something still bothers me about it, but I can't invent any real objections myself.

--
You received this message because you are subscribed to the Google Groups "Django 
developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to