From 57c8695bccf41a4e716f10f141652d637b0adb4c Mon Sep 17 00:00:00 2001 From: "R. Miles McCain" Date: Sat, 31 Jul 2021 23:44:03 +0000 Subject: [PATCH] Debug toolbar fix --- shynet/shynet/settings.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shynet/shynet/settings.py b/shynet/shynet/settings.py index e92fd52..6d1f418 100644 --- a/shynet/shynet/settings.py +++ b/shynet/shynet/settings.py @@ -61,8 +61,9 @@ INSTALLED_APPS = [ "analytics", "allauth", "allauth.account", - "allauth.socialaccount" -] + (["debug_toolbar"] if DEBUG else []) + "allauth.socialaccount", + "debug_toolbar", +] MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", @@ -74,7 +75,8 @@ MIDDLEWARE = [ "django.contrib.sites.middleware.CurrentSiteMiddleware", "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", -] + (["debug_toolbar.middleware.DebugToolbarMiddleware"] if DEBUG else []) + "debug_toolbar.middleware.DebugToolbarMiddleware", +] ROOT_URLCONF = "shynet.urls"