Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #15158 -- Fixed error introduced in r15252 in rendering of the …

…template post morten section of the 500 error debug page with loaders other than the file system or application dir loaders. Refs #15122. Thanks gsf for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15360 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4392c8e67ed6009602ff72af0a786c1053d55302 1 parent 34288ec
Ramiro Morales ramiro authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 django/views/debug.py
6 django/views/debug.py
View
@@ -91,16 +91,18 @@ def get_traceback_html(self):
module = import_module(loader.__module__)
if hasattr(loader, '__class__'):
source_list_func = loader.get_template_sources
- loader_name = loader.__module__ + '.' + loader.__class__.__name__
else: # NOTE: Remember to remove this branch when we deprecate old template loaders in 1.4
source_list_func = module.get_template_sources
- loader_name = loader.__module__ + '.' + loader.__name__
# NOTE: This assumes exc_value is the name of the template that
# the loader attempted to load.
template_list = [{'name': t, 'exists': os.path.exists(t)} \
for t in source_list_func(str(self.exc_value))]
except (ImportError, AttributeError):
template_list = []
+ if hasattr(loader, '__class__'):
+ loader_name = loader.__module__ + '.' + loader.__class__.__name__
+ else: # NOTE: Remember to remove this branch when we deprecate old template loaders in 1.4
+ loader_name = loader.__module__ + '.' + loader.__name__
self.loader_debug_info.append({
'loader': loader_name,
'templates': template_list,
Please sign in to comment.
Something went wrong with that request. Please try again.