From a7b98c1895e0a2f2f0004e0c65c24419d6ff0ec9 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 2 Mar 2019 17:06:59 +0100 Subject: [PATCH] Fix debug status --- friends_map/settings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/friends_map/settings.py b/friends_map/settings.py index df5e1a4..2b6a106 100644 --- a/friends_map/settings.py +++ b/friends_map/settings.py @@ -25,7 +25,8 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '(b_w%!e9u!3q=d-u!$g6ntpzh-=4mo$gs#96as+^179vp6stui' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DJANGO_ENV = os.getenv('DJANGO_ENV', 'prod') == 'dev' +DEBUG = os.getenv('DJANGO_DEBUG', 'false').lower() == 'true' ALLOWED_HOSTS = [ '.herokuapp.com', @@ -158,4 +159,4 @@ APP = { CRISPY_TEMPLATE_PACK = 'bootstrap4' LOGOUT_REDIRECT_URL = '/' -django_heroku.settings(locals(), allowed_hosts=False, databases=not DEBUG) +django_heroku.settings(locals(), allowed_hosts=False, databases=DJANGO_ENV == 'prod')