diff --git a/django/views/debug.py b/django/views/debug.py
|
a
|
b
|
|
| 91 | 91 | module = import_module(loader.__module__) |
| 92 | 92 | if hasattr(loader, '__class__'): |
| 93 | 93 | source_list_func = loader.get_template_sources |
| 94 | | loader_name = loader.__module__ + '.' + loader.__class__.__name__ |
| 95 | 94 | else: # NOTE: Remember to remove this branch when we deprecate old template loaders in 1.4 |
| 96 | 95 | source_list_func = module.get_template_sources |
| 97 | | loader_name = loader.__module__ + '.' + loader.__name__ |
| 98 | 96 | # NOTE: This assumes exc_value is the name of the template that |
| 99 | 97 | # the loader attempted to load. |
| 100 | 98 | template_list = [{'name': t, 'exists': os.path.exists(t)} \ |
| 101 | 99 | for t in source_list_func(str(self.exc_value))] |
| 102 | 100 | except (ImportError, AttributeError): |
| 103 | 101 | template_list = [] |
| | 102 | if hasattr(loader, '__class__'): |
| | 103 | loader_name = loader.__module__ + '.' + loader.__class__.__name__ |
| | 104 | else: # NOTE: Remember to remove this branch when we deprecate old template loaders in 1.4 |
| | 105 | loader_name = loader.__module__ + '.' + loader.__name__ |
| 104 | 106 | self.loader_debug_info.append({ |
| 105 | 107 | 'loader': loader_name, |
| 106 | 108 | 'templates': template_list, |