diff --git a/src/bornhack/environment_settings.py.dist b/src/bornhack/environment_settings.py.dist index 1e7bc68fc..e169c6ece 100644 --- a/src/bornhack/environment_settings.py.dist +++ b/src/bornhack/environment_settings.py.dist @@ -16,6 +16,7 @@ DATABASES = { } DEBUG={{ django_debug }} +DEBUG_TOOLBAR_ENABLED={{ django_debug_toolbar_enabled }} # start redirecting to the next camp instead of the previous camp after diff --git a/src/bornhack/environment_settings.py.dist.dev b/src/bornhack/environment_settings.py.dist.dev index 97be3dd37..0d95c21b9 100644 --- a/src/bornhack/environment_settings.py.dist.dev +++ b/src/bornhack/environment_settings.py.dist.dev @@ -23,6 +23,7 @@ DATABASES = { } } DEBUG = True +DEBUG_TOOLBAR_ENABLED = DEBUG CHANNEL_LAYERS = {} ASGI_APPLICATION = "bornhack.routing.application" diff --git a/src/bornhack/settings.py b/src/bornhack/settings.py index 43b8db2c4..1c11a159b 100644 --- a/src/bornhack/settings.py +++ b/src/bornhack/settings.py @@ -145,7 +145,7 @@ CORS_ORIGIN_ALLOW_ALL = True CORS_URLS_REGEX = r"^/api/*$" -if DEBUG: # noqa: F405 +if DEBUG_TOOLBAR_ENABLED: # noqa: F405 EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" INSTALLED_APPS += ["debug_toolbar"] MIDDLEWARE = ["debug_toolbar.middleware.DebugToolbarMiddleware"] + MIDDLEWARE diff --git a/src/bornhack/urls.py b/src/bornhack/urls.py index 31a3a86a2..8a2a5e3b4 100644 --- a/src/bornhack/urls.py +++ b/src/bornhack/urls.py @@ -188,7 +188,7 @@ ), ] -if settings.DEBUG: +if settings.DEBUG_TOOLBAR_ENABLED: import debug_toolbar urlpatterns = [path("__debug__/", include(debug_toolbar.urls))] + urlpatterns