aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/toolbar
diff options
context:
space:
mode:
authorJannis Leidel2012-05-13 12:12:56 +0200
committerJannis Leidel2012-05-13 12:12:56 +0200
commit7fa83ed02ee038802d41f955966c892148385bae (patch)
tree711baff3e8057d4bc88c0f9c9b84f15f810d07da /debug_toolbar/toolbar
parentc590c7e1f825e2610f25e5512794aeb24fdf0cd5 (diff)
downloaddjango-debug-toolbar-7fa83ed02ee038802d41f955966c892148385bae.tar.bz2
Minor cosmetic cleanup, switching out __import__ calls with the proper use of Django's import_module.
Diffstat (limited to 'debug_toolbar/toolbar')
-rw-r--r--debug_toolbar/toolbar/loader.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/debug_toolbar/toolbar/loader.py b/debug_toolbar/toolbar/loader.py
index 4d09a27..02a558d 100644
--- a/debug_toolbar/toolbar/loader.py
+++ b/debug_toolbar/toolbar/loader.py
@@ -7,6 +7,7 @@ import os.path
from django.conf import settings
from django.template.loader import render_to_string
from django.utils.datastructures import SortedDict
+from django.utils.importlib import import_module
from django.utils.safestring import mark_safe
@@ -91,10 +92,10 @@ def load_panel_classes():
dot = panel_path.rindex('.')
except ValueError:
raise ImproperlyConfigured(
- '%s isn\'t a debug panel module' % panel_path)
+ "%s isn't a debug panel module" % panel_path)
panel_module, panel_classname = panel_path[:dot], panel_path[dot + 1:]
try:
- mod = __import__(panel_module, {}, {}, [''])
+ mod = import_module(panel_module)
except ImportError, e:
raise ImproperlyConfigured(
'Error importing debug panel %s: "%s"' %