On 12/01/2010 04:26 PM, Łukasz Rekucki wrote:
What about view decorators?
I don't want to invent use cases here, but if I right now have a view
decorator that on it's way out changes something that could alter how
a template is rendered (like current language, some settings or the
database contents), then changing to TemplateResponse will break this
view.
If you're talking about "right now" and "alter how a template is
rendered" then this view either doesn't return an HttpResponse instance
or returns its custom descendant. Hence such view won't be affected by
introduction of a new shortcut or TemplateResponse.
What I'm talking about is that currently a middleware or a decorator
that expects a normal HttpResponse instance can only access its headers
or completely rendered content. The laziness of TemplateResponse can't
break it.
May be I don't understand what you're trying to show here. Can you
provide a small example?
--
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.