1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

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

@@ -133,7 +133,7 @@ class BaseHandler(object):
if hasattr(response, 'render') and callable(response.render):
for middleware_method in self._template_response_middleware:
response = middleware_method(request, response)
response.render()
response = response.render()
except http.Http404, e:
logger.warning('Not Found: %s' % request.path,