summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-02-11 06:51:57 -0500
committerTim Graham <timograham@gmail.com>2017-02-11 06:52:14 -0500
commit9658f0d266bfded9ead5ead7a80823b4739c149f (patch)
tree2e8610084c008c7a7994c516ab5d8d83ad79da6d /django
parenteeb28f47512c5ff969d014ba35b9e955de1583ce (diff)
[1.11.x] Fixed #27722 -- Reallowed using django.Template in {% include %}.
Backport of fe2d2884345e1e6a1daadd76e9404c62791ab589 from master
Diffstat (limited to 'django')
-rw-r--r--django/template/loader_tags.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/template/loader_tags.py b/django/template/loader_tags.py
index 2ed145c248..4ff5ec4db5 100644
--- a/django/template/loader_tags.py
+++ b/django/template/loader_tags.py
@@ -202,6 +202,9 @@ class IncludeNode(Node):
if template is None:
template = context.template.engine.get_template(template_name)
cache[template_name] = template
+ # Use the base.Template of a backends.django.Template.
+ elif hasattr(template, 'template'):
+ template = template.template
values = {
name: var.resolve(context)
for name, var in six.iteritems(self.extra_context)