mirror of
				https://github.com/django/django.git
				synced 2025-10-30 09:06:13 +00:00 
			
		
		
		
	Passed a reference to the current engine when instantiating Template.
This commit is contained in:
		| @@ -403,7 +403,7 @@ class SsiNode(Node): | |||||||
|             output = '' |             output = '' | ||||||
|         if self.parsed: |         if self.parsed: | ||||||
|             try: |             try: | ||||||
|                 t = Template(output, name=filepath) |                 t = Template(output, name=filepath, engine=context.engine) | ||||||
|                 return t.render(context) |                 return t.render(context) | ||||||
|             except TemplateSyntaxError as e: |             except TemplateSyntaxError as e: | ||||||
|                 if settings.DEBUG: |                 if settings.DEBUG: | ||||||
|   | |||||||
| @@ -126,7 +126,7 @@ class Engine(object): | |||||||
|         Returns a compiled Template object for the given template code, |         Returns a compiled Template object for the given template code, | ||||||
|         handling template inheritance recursively. |         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): |     def get_template(self, template_name, dirs=_dirs_undefined): | ||||||
|         """ |         """ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user