Ticket #13745: template_extends_select_multi.2.diff
File template_extends_select_multi.2.diff, 946 bytes (added by , 14 years ago) |
---|
-
django/template/loader_tags.py
1 1 from django.template import TemplateSyntaxError, TemplateDoesNotExist, Variable 2 2 from django.template import Library, Node, TextNode 3 from django.template.loader import get_template 3 from django.template.loader import get_template, select_template 4 4 from django.conf import settings 5 5 from django.utils.safestring import mark_safe 6 6 … … 97 97 raise TemplateSyntaxError(error_msg) 98 98 if hasattr(parent, 'render'): 99 99 return parent # parent is a Template object 100 return get_template(parent)100 return select_template(parent) if isinstance(parent, (list, tuple)) else get_template(parent) 101 101 102 102 def render(self, context): 103 103 compiled_parent = self.get_parent(context)