Passed a reference to the current engine when instantiating Template.

This commit is contained in:
Aymeric Augustin 2014-11-28 22:32:10 +01:00
parent 24dffaf0cb
commit b34b8a12b7
2 changed files with 2 additions and 2 deletions

View File

@ -403,7 +403,7 @@ class SsiNode(Node):
output = ''
if self.parsed:
try:
t = Template(output, name=filepath)
t = Template(output, name=filepath, engine=context.engine)
return t.render(context)
except TemplateSyntaxError as e:
if settings.DEBUG:

View File

@ -126,7 +126,7 @@ class Engine(object):
Returns a compiled Template object for the given template code,
handling template inheritance recursively.
"""
return Template(source, origin, name)
return Template(source, origin, name, engine=self)
def get_template(self, template_name, dirs=_dirs_undefined):
"""