aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/middleware.py
diff options
context:
space:
mode:
authorDavid Cramer2011-05-27 15:13:41 -0700
committerDavid Cramer2011-05-27 15:13:41 -0700
commitc61daab0ce10d9654ecb9ce70819233171885eae (patch)
treec80bf2382928cc860eb689fde56f74edad7cad1b /debug_toolbar/middleware.py
parent34d03283327d58342f0c1d72ee7bb7d029dc8815 (diff)
downloaddjango-debug-toolbar-c61daab0ce10d9654ecb9ce70819233171885eae.tar.bz2
Change __import__ usage to to be import_module, adjust test reqs to specify >= 1.1,< 1.4, and add note about required Django version
Diffstat (limited to 'debug_toolbar/middleware.py')
-rw-r--r--debug_toolbar/middleware.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py
index fa64a16..05d8e80 100644
--- a/debug_toolbar/middleware.py
+++ b/debug_toolbar/middleware.py
@@ -9,6 +9,7 @@ from django.conf.urls.defaults import include, patterns
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.utils.encoding import smart_unicode
+from django.utils.importlib import import_module
import debug_toolbar.urls
from debug_toolbar.toolbar.loader import DebugToolbar
@@ -79,7 +80,7 @@ class DebugToolbarMiddleware(object):
urlconf = getattr(request, 'urlconf', settings.ROOT_URLCONF)
if isinstance(urlconf, basestring):
- urlconf = __import__(getattr(request, 'urlconf', settings.ROOT_URLCONF), {}, {}, ['*'])
+ urlconf = import_module(getattr(request, 'urlconf', settings.ROOT_URLCONF))
if urlconf not in self._urlconfs:
new_urlconf = imp.new_module('urlconf')