Ticket #12064: includefix.diff
File includefix.diff, 791 bytes (added by , 15 years ago) |
---|
-
django/template/loader_tags.py
old new 98 98 99 99 class ConstantIncludeNode(Node): 100 100 def __init__(self, template_path): 101 self.template_path = template_path 102 103 def render(self, context): 101 104 try: 102 t = get_template( template_path)103 self.template = t105 t = get_template(self.template_path) 106 return t.render(context) 104 107 except: 105 108 if settings.TEMPLATE_DEBUG: 106 109 raise 107 self.template = None108 109 def render(self, context):110 if self.template:111 return self.template.render(context)112 else:113 110 return '' 114 111 115 112 class IncludeNode(Node):