Author: ramiro
Date: 2011-04-02 11:48:18 -0700 (Sat, 02 Apr 2011)
New Revision: 16003

Modified:
   django/trunk/django/views/debug.py
Log:
Removed support code for deprecated module-based template loaders from debug 
view postmortem.

Modified: django/trunk/django/views/debug.py
===================================================================
--- django/trunk/django/views/debug.py  2011-04-02 13:55:03 UTC (rev 16002)
+++ django/trunk/django/views/debug.py  2011-04-02 18:48:18 UTC (rev 16003)
@@ -88,21 +88,14 @@
             self.loader_debug_info = []
             for loader in template_source_loaders:
                 try:
-                    module = import_module(loader.__module__)
-                    if hasattr(loader, '__class__'):
-                        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
+                    source_list_func = loader.get_template_sources
                     # 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):
+                except 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__
+                loader_name = loader.__module__ + '.' + 
loader.__class__.__name__
                 self.loader_debug_info.append({
                     'loader': loader_name,
                     'templates': template_list,

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to