diff --git a/docs/changes.rst b/docs/changes.rst index 701f9d608..569f88975 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -6,6 +6,8 @@ Pending * Added a note about the default password in ``make example``. * Removed logging about the toolbar failing to serialize a value into JSON. +* 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) ------------------ 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()