diff options
| -rw-r--r-- | debug_toolbar/__init__.py | 6 | ||||
| -rw-r--r-- | debug_toolbar/toolbar.py | 3 | 
2 files changed, 6 insertions, 3 deletions
| diff --git a/debug_toolbar/__init__.py b/debug_toolbar/__init__.py index 12a7fc8..7ebd1c7 100644 --- a/debug_toolbar/__init__.py +++ b/debug_toolbar/__init__.py @@ -11,7 +11,7 @@ except Exception:      VERSION = 'unknown' -from .toolbar import DebugToolbar +# Code that discovers files or modules in INSTALLED_APPS imports this module. +# Reference URLpatterns with a string to avoid the risk of circular imports. - -urls = DebugToolbar.get_urls(), 'djdt', 'djdt' +urls = 'debug_toolbar.toolbar', 'djdt', 'djdt' diff --git a/debug_toolbar/toolbar.py b/debug_toolbar/toolbar.py index 80b6dff..36c301a 100644 --- a/debug_toolbar/toolbar.py +++ b/debug_toolbar/toolbar.py @@ -130,3 +130,6 @@ class DebugToolbar(object):                  urlpatterns += panel_class.get_urls()              cls._urlpatterns = urlpatterns          return cls._urlpatterns + + +urlpatterns = DebugToolbar.get_urls() | 
