Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #1531 -- Fixed eager exception catching that caused the templat…

…e system to report a base template didn't exist when indeed it does exist but contains an {% include %} of a nonexisting template

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 853ee34191b6d49bf19743b4ed4feb779ff66f1a 1 parent c862e43
Adrian Holovaty authored April 12, 2006

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  django/core/template/loader_tags.py
4  django/core/template/loader_tags.py
@@ -50,9 +50,11 @@ def get_parent(self, context):
50 50
                 error_msg += " Got this from the %r variable." % self.parent_name_expr #TODO nice repr.
51 51
             raise TemplateSyntaxError, error_msg
52 52
         try:
53  
-            return get_template_from_string(*find_template_source(parent, self.template_dirs))
  53
+            source, origin = find_template_source(parent, self.template_dirs)
54 54
         except TemplateDoesNotExist:
55 55
             raise TemplateSyntaxError, "Template %r cannot be extended, because it doesn't exist" % parent
  56
+        else:
  57
+            return get_template_from_string(source, origin)
56 58
 
57 59
     def render(self, context):
58 60
         compiled_parent = self.get_parent(context)

0 notes on commit 853ee34

Please sign in to comment.
Something went wrong with that request. Please try again.