From f229740fdc9892cdc6f8c4760f674dd41b7f3040 Mon Sep 17 00:00:00 2001 From: Lidoca <32785562+Lidoca@users.noreply.github.com> Date: Sun, 3 Aug 2025 16:18:25 +0900 Subject: [PATCH 1/2] docs: move the import statement of `debug_toolbar_urls` to inside of the if statement for avoiding potential errors --- docs/installation.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/installation.rst b/docs/installation.rst index 7e356da83..995214766 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -183,9 +183,10 @@ You should also modify your URLconf file: .. code-block:: python from django.conf import settings - from debug_toolbar.toolbar import debug_toolbar_urls if not settings.TESTING: + from debug_toolbar.toolbar import debug_toolbar_urls + urlpatterns = [ *urlpatterns, ] + debug_toolbar_urls() From 0068090dd227cde7c7de3a8d5347b3477bb35c43 Mon Sep 17 00:00:00 2001 From: Tim Schilling Date: Sun, 17 Aug 2025 14:46:45 +0300 Subject: [PATCH 2/2] Add change log message for moving the docs --- docs/changes.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/changes.rst b/docs/changes.rst index 5c7c0844b..fab0c35aa 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -1,6 +1,12 @@ Change log ========== +Pending +------- + +* Moved the the import statement of ``debug_toolbar.urls`` to within the if + statement's scope on the installation documentation. + 6.0.0 (2025-07-22) ------------------