Ticket #949: django.patch
File django.patch, 1.3 KB (added by , 19 years ago) |
---|
-
core/template/loader_tags.py
1 1 from django.core.template import TemplateSyntaxError, TemplateDoesNotExist, resolve_variable 2 2 from django.core.template import Library, Context, Node 3 from django.core.template.loader import get_template, get_template_from_string, find_template_source3 from django.core.template.loader import select_template, get_template_from_string, find_template_source 4 4 from django.conf.settings import TEMPLATE_DEBUG 5 5 register = Library() 6 6 … … 79 79 class ConstantIncludeNode(Node): 80 80 def __init__(self, template_path): 81 81 try: 82 t = get_template(template_path)82 t = select_template(template_path.split(',')) 83 83 self.template = t 84 84 except: 85 85 if TEMPLATE_DEBUG: … … 99 99 def render(self, context): 100 100 try: 101 101 template_name = resolve_variable(self.template_name, context) 102 t = get_template(template_name)102 t = select_template(template_name.split(',')) 103 103 return t.render(context) 104 104 except TemplateSyntaxError, e: 105 105 if TEMPLATE_DEBUG: