summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2014-11-10 14:43:40 +0000
committerLuke Plant <L.Plant.98@cantab.net>2014-11-10 14:47:45 +0000
commitb748a8bc670af10c37560836c353ce911eaeecc0 (patch)
tree099388cd7a6168b67e6dcde81e2e1f1dd42a9c89 /django
parent006451f8943af2974a9a2c105dbc8470a33624c1 (diff)
Fixed #23789 -- TemplateResponse handles context differently from render
Diffstat (limited to 'django')
-rw-r--r--django/template/response.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/template/response.py b/django/template/response.py
index f65c3adb8b..f43a4e0f53 100644
--- a/django/template/response.py
+++ b/django/template/response.py
@@ -154,4 +154,7 @@ class TemplateResponse(SimpleTemplateResponse):
"""
if isinstance(context, Context):
return context
- return RequestContext(self._request, context, current_app=self._current_app)
+ context_instance = RequestContext(self._request, current_app=self._current_app)
+ if context:
+ context_instance.push(context)
+ return context_instance