Removed support code for deprecated module-based template loaders from debug view postmortem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16003 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
74f7ad32a5
commit
ecdcf477f9
|
@ -88,21 +88,14 @@ class ExceptionReporter(object):
|
||||||
self.loader_debug_info = []
|
self.loader_debug_info = []
|
||||||
for loader in template_source_loaders:
|
for loader in template_source_loaders:
|
||||||
try:
|
try:
|
||||||
module = import_module(loader.__module__)
|
|
||||||
if hasattr(loader, '__class__'):
|
|
||||||
source_list_func = loader.get_template_sources
|
source_list_func = loader.get_template_sources
|
||||||
else: # NOTE: Remember to remove this branch when we deprecate old template loaders in 1.4
|
|
||||||
source_list_func = module.get_template_sources
|
|
||||||
# NOTE: This assumes exc_value is the name of the template that
|
# NOTE: This assumes exc_value is the name of the template that
|
||||||
# the loader attempted to load.
|
# the loader attempted to load.
|
||||||
template_list = [{'name': t, 'exists': os.path.exists(t)} \
|
template_list = [{'name': t, 'exists': os.path.exists(t)} \
|
||||||
for t in source_list_func(str(self.exc_value))]
|
for t in source_list_func(str(self.exc_value))]
|
||||||
except (ImportError, AttributeError):
|
except AttributeError:
|
||||||
template_list = []
|
template_list = []
|
||||||
if hasattr(loader, '__class__'):
|
|
||||||
loader_name = loader.__module__ + '.' + loader.__class__.__name__
|
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({
|
self.loader_debug_info.append({
|
||||||
'loader': loader_name,
|
'loader': loader_name,
|
||||||
'templates': template_list,
|
'templates': template_list,
|
||||||
|
|
Loading…
Reference in New Issue