This commit is contained in:
Ross
2025-12-15 21:46:00 +00:00
parent 5b4838e67d
commit bc7036859e
+4 -7
View File
@@ -25,10 +25,7 @@ urlpatterns = [
] ]
if settings.DEBUG: if settings.DEBUG:
try: # Include django-debug-toolbar when running in DEBUG mode. Use a string
import debug_toolbar # include so the project doesn't fail to import if the package isn't
# installed; developers should install it in their dev environment.
urlpatterns = [path("__debug__/", include(debug_toolbar.urls))] + urlpatterns urlpatterns = [path("__debug__/", include("debug_toolbar.urls"))] + urlpatterns
except Exception:
# debug_toolbar not installed; skip
pass