summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-02-22 14:05:53 -0500
committerTim Graham <timograham@gmail.com>2016-02-22 17:07:07 -0500
commit3fedfc452fa94f8a6c9a64289d00202313ceb564 (patch)
tree6dd0d4aff262bb1385ca336cd8bd621d1ee6d714 /django
parent174811c5538c8c0b8f66089b31686e80d2bc7d3b (diff)
[1.9.x] Fixed #26253 -- Fixed crashing deprecation shims in SimpleTemplateResponse.
Thanks David Reitter for the report and initial patch.
Diffstat (limited to 'django')
-rw-r--r--django/template/response.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/template/response.py b/django/template/response.py
index 17b6066a81..a30d982b9c 100644
--- a/django/template/response.py
+++ b/django/template/response.py
@@ -4,7 +4,7 @@ from django.http import HttpResponse
from django.utils import six
from django.utils.deprecation import RemovedInDjango110Warning
-from .backends.django import Template as BackendTemplate
+from .backends.django import DjangoTemplates, Template as BackendTemplate
from .base import Template
from .context import Context, RequestContext, _current_app_undefined
from .loader import get_template, select_template
@@ -25,7 +25,7 @@ class SimpleTemplateResponse(HttpResponse):
"anymore. It may be a backend-specific template like those "
"created by get_template().".format(self.__class__.__name__),
RemovedInDjango110Warning, stacklevel=2)
- template = BackendTemplate(template)
+ template = BackendTemplate(template, DjangoTemplates)
# It would seem obvious to call these next two members 'template' and
# 'context', but those names are reserved as part of the test Client
@@ -95,7 +95,7 @@ class SimpleTemplateResponse(HttpResponse):
"{}.".format(
self.__class__.__name__, new_template.__class__.__name__),
RemovedInDjango110Warning, stacklevel=2)
- new_template = BackendTemplate(new_template)
+ new_template = BackendTemplate(new_template, DjangoTemplates)
return new_template
def resolve_context(self, context):