1 | *** django1.9.2/django/template/response.py Sat Feb 20 16:41:38 2016 |
---|
2 | --- django/template/response.py Sat Feb 20 16:43:22 2016 |
---|
3 | *************** from django.http import HttpResponse |
---|
4 | *** 4,10 **** |
---|
5 | from django.utils import six |
---|
6 | from django.utils.deprecation import RemovedInDjango110Warning |
---|
7 | |
---|
8 | ! from .backends.django import Template as BackendTemplate |
---|
9 | from .base import Template |
---|
10 | from .context import Context, RequestContext, _current_app_undefined |
---|
11 | from .loader import get_template, select_template |
---|
12 | --- 4,10 ---- |
---|
13 | from django.utils import six |
---|
14 | from django.utils.deprecation import RemovedInDjango110Warning |
---|
15 | |
---|
16 | ! from .backends.django import DjangoTemplates, Template as BackendTemplate |
---|
17 | from .base import Template |
---|
18 | from .context import Context, RequestContext, _current_app_undefined |
---|
19 | from .loader import get_template, select_template |
---|
20 | *************** class SimpleTemplateResponse(HttpRespons |
---|
21 | *** 25,31 **** |
---|
22 | "anymore. It may be a backend-specific template like those " |
---|
23 | "created by get_template().".format(self.__class__.__name__), |
---|
24 | RemovedInDjango110Warning, stacklevel=2) |
---|
25 | ! template = BackendTemplate(template) |
---|
26 | |
---|
27 | # It would seem obvious to call these next two members 'template' and |
---|
28 | # 'context', but those names are reserved as part of the test Client |
---|
29 | --- 25,31 ---- |
---|
30 | "anymore. It may be a backend-specific template like those " |
---|
31 | "created by get_template().".format(self.__class__.__name__), |
---|
32 | RemovedInDjango110Warning, stacklevel=2) |
---|
33 | ! template = BackendTemplate(template, DjangoTemplates) |
---|
34 | |
---|
35 | # It would seem obvious to call these next two members 'template' and |
---|
36 | # 'context', but those names are reserved as part of the test Client |
---|
37 | *************** class SimpleTemplateResponse(HttpRespons |
---|
38 | *** 95,101 **** |
---|
39 | "{}.".format( |
---|
40 | self.__class__.__name__, new_template.__class__.__name__), |
---|
41 | RemovedInDjango110Warning, stacklevel=2) |
---|
42 | ! new_template = BackendTemplate(new_template) |
---|
43 | return new_template |
---|
44 | |
---|
45 | def resolve_context(self, context): |
---|
46 | --- 95,101 ---- |
---|
47 | "{}.".format( |
---|
48 | self.__class__.__name__, new_template.__class__.__name__), |
---|
49 | RemovedInDjango110Warning, stacklevel=2) |
---|
50 | ! new_template = BackendTemplate(new_template, DjangoTemplates) |
---|
51 | return new_template |
---|
52 | |
---|
53 | def resolve_context(self, context): |
---|