diff options
| author | David Cramer | 2011-05-27 15:13:41 -0700 | 
|---|---|---|
| committer | David Cramer | 2011-05-27 15:13:41 -0700 | 
| commit | c61daab0ce10d9654ecb9ce70819233171885eae (patch) | |
| tree | c80bf2382928cc860eb689fde56f74edad7cad1b | |
| parent | 34d03283327d58342f0c1d72ee7bb7d029dc8815 (diff) | |
| download | django-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
| -rw-r--r-- | README.rst | 2 | ||||
| -rw-r--r-- | debug_toolbar/middleware.py | 3 | ||||
| -rw-r--r-- | setup.py | 2 | 
3 files changed, 5 insertions, 2 deletions
| @@ -25,6 +25,8 @@ There is also one Django management command currently:  If you have ideas for other panels please let us know. +* Note: The Debug Toolbar only works on Django 1.1 and newer. +  Installation  ============ 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') @@ -13,7 +13,7 @@ setup(      license='BSD',      packages=find_packages(exclude=['ez_setup']),      tests_require=[ -        'django', +        'django>=1.1,<1.4',          'dingus',      ],      test_suite='debug_toolbar.runtests.runtests', | 
