Skip to content

Commit ff0b974

Browse files
committed
Fix #1581: Duplicate the 'djdt' app_name to avoid importing the toolbar early
1 parent 3cdf525 commit ff0b974

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

debug_toolbar/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
from debug_toolbar.urls import app_name
2-
31
__all__ = ["VERSION"]
42

5-
63
# Do not use pkg_resources to find the version but set it here directly!
74
# see issue #1446
85
VERSION = "3.2.4"
96

107
# Code that discovers files or modules in INSTALLED_APPS imports this module.
11-
12-
urls = "debug_toolbar.urls", app_name
8+
urls = "debug_toolbar.urls", "djdt" # See debug_toolbar/urls.py

debug_toolbar/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from debug_toolbar.toolbar import DebugToolbar
22

3-
app_name = "djdt"
3+
app_name = "djdt" # See debug_toolbar/__init__.py
44
urlpatterns = DebugToolbar.get_urls()

0 commit comments

Comments
 (0)