Fixed #16004 - csrf_protect does not send cookie if view returns TemplateResponse

The root bug was in decorator_from_middleware, and the fix also corrects
bugs with gzip_page and other decorators.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Luke Plant 2011-05-24 21:28:43 +00:00
parent d7036e52ab
commit a482cc0ba3
5 changed files with 88 additions and 7 deletions

View file

@ -119,6 +119,10 @@ Methods
rendered :class:`~django.template.response.SimpleTemplateResponse`
instance.
If the callback returns a value that is not `None`, this will be
used as the response instead of the original response object (and
will be passed to the next post rendering callback etc.)
.. method:: SimpleTemplateResponse.render():
Sets :attr:`response.content` to the result obtained by