Skip to content

Commit c61daab

Browse files
committed
Change __import__ usage to to be import_module, adjust test reqs to specify >= 1.1,< 1.4, and add note about required Django version
1 parent 34d0328 commit c61daab

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

README.rst

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ There is also one Django management command currently:
2525

2626
If you have ideas for other panels please let us know.
2727

28+
* Note: The Debug Toolbar only works on Django 1.1 and newer.
29+
2830
Installation
2931
============
3032

debug_toolbar/middleware.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from django.http import HttpResponseRedirect
1010
from django.shortcuts import render_to_response
1111
from django.utils.encoding import smart_unicode
12+
from django.utils.importlib import import_module
1213

1314
import debug_toolbar.urls
1415
from debug_toolbar.toolbar.loader import DebugToolbar
@@ -79,7 +80,7 @@ def process_request(self, request):
7980

8081
urlconf = getattr(request, 'urlconf', settings.ROOT_URLCONF)
8182
if isinstance(urlconf, basestring):
82-
urlconf = __import__(getattr(request, 'urlconf', settings.ROOT_URLCONF), {}, {}, ['*'])
83+
urlconf = import_module(getattr(request, 'urlconf', settings.ROOT_URLCONF))
8384

8485
if urlconf not in self._urlconfs:
8586
new_urlconf = imp.new_module('urlconf')

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
license='BSD',
1414
packages=find_packages(exclude=['ez_setup']),
1515
tests_require=[
16-
'django',
16+
'django>=1.1,<1.4',
1717
'dingus',
1818
],
1919
test_suite='debug_toolbar.runtests.runtests',

0 commit comments

Comments
 (0)