Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix #885

git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@1375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit fbae051559b5465ddd4a959dbd72d8178d05c577 1 parent c8719b7
Robert Wittams authored November 23, 2005

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  django/core/template/loader.py
6  django/core/template/loader.py
@@ -21,7 +21,7 @@
21 21
 # installed, because pkg_resources is necessary to read eggs.
22 22
 
23 23
 from django.core.exceptions import ImproperlyConfigured
24  
-from django.core.template import Origin, StringOrigin, Template, Context, Node, TemplateDoesNotExist, TemplateSyntaxError, resolve_variable_with_filters, register_tag
  24
+from django.core.template import Origin, StringOrigin, Template, Context, Node, TemplateDoesNotExist, TemplateSyntaxError, resolve_variable_with_filters, resolve_variable, register_tag
25 25
 from django.conf.settings import TEMPLATE_LOADERS, TEMPLATE_DEBUG
26 26
 
27 27
 template_source_loaders = []
@@ -207,9 +207,11 @@ def render(self, context):
207 207
              template_name = resolve_variable(self.template_name, context)
208 208
              t = get_template(template_name)
209 209
              return t.render(context)
210  
-         except Exception, e:
  210
+         except TemplateSyntaxError, e:
211 211
              if TEMPLATE_DEBUG:
212 212
                  raise
  213
+             return ''
  214
+         except:
213 215
              return '' # Fail silently for invalid included templates.
214 216
 
215 217
 def do_block(parser, token):

0 notes on commit fbae051

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