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] 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()