Skip to content

Commit

Permalink
Provisionally import debug_toolbar urls iff DEBUG = True
Browse files Browse the repository at this point in the history
  • Loading branch information
dchiller committed May 14, 2024
1 parent 856f4dc commit 7ec5a66
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions django/cantusdb_project/main_app/urls.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from django.urls import include, path
from django.conf import settings
from django.contrib.auth.views import (
PasswordResetView,
PasswordResetDoneView,
PasswordResetConfirmView,
PasswordResetCompleteView,
)
from main_app.views import views
import debug_toolbar
from main_app.views.century import (
CenturyDetailView,
)
Expand Down Expand Up @@ -75,7 +75,6 @@
)

urlpatterns = [
path("__debug__/", include(debug_toolbar.urls)),
path(
"contact/",
views.contact,
Expand Down Expand Up @@ -512,3 +511,8 @@
name="differentia-autocomplete",
),
]

if settings.DEBUG:
import debug_toolbar

urlpatterns.append(path("__debug__/", include(debug_toolbar.urls)))

0 comments on commit 7ec5a66

Please sign in to comment.