mirror of
https://github.com/django/django.git
synced 2025-10-30 17:16:10 +00:00
Fixed #14046 -- Made {% include %} behave the same, regardless of whether the template included is named by variable or constant string. Thanks to defcube for the report, and George Karpenkov for the draft patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15413 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -168,12 +168,10 @@ class IncludeNode(BaseIncludeNode):
|
||||
template_name = self.template_name.resolve(context)
|
||||
template = get_template(template_name)
|
||||
return self.render_template(template, context)
|
||||
except TemplateSyntaxError:
|
||||
except:
|
||||
if settings.TEMPLATE_DEBUG:
|
||||
raise
|
||||
return ''
|
||||
except:
|
||||
return '' # Fail silently for invalid included templates.
|
||||
|
||||
def do_block(parser, token):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user