From 028443b79fb59375ca09be953b8db1244a3c5fcc Mon Sep 17 00:00:00 2001 From: Tom Webber Date: Tue, 2 Apr 2024 11:04:42 +0100 Subject: [PATCH] ensure DEBUG is set as expected --- core/settings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/settings.py b/core/settings.py index f5c8cbcf..adecb479 100644 --- a/core/settings.py +++ b/core/settings.py @@ -14,7 +14,11 @@ SECRET_KEY = str(os.environ.get("SECRET_KEY")) # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = bool(os.environ.get("DEBUG", default=0)) +DEBUG = os.environ.get("DEBUG", default=0) +if DEBUG in ["True", "true", "T", "1"] or DEBUG: + DEBUG = True +else: + DEBUG = False ALLOWED_HOSTS = str(os.environ.get("DJANGO_ALLOWED_HOSTS")).split(" ")