From d1c17c3c73bc1bc711c263c2562a346f5e53444f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Tue, 31 Mar 2020 22:41:33 +0200 Subject: [PATCH] fix dev/prod settings --- sdbs_pile/settings.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sdbs_pile/settings.py b/sdbs_pile/settings.py index e08e4ff..9aaf0fb 100644 --- a/sdbs_pile/settings.py +++ b/sdbs_pile/settings.py @@ -19,12 +19,14 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'x5j0*70$a&l*n_@kn=j%4_@_+ismdl-o8!z0@vyjfl0tt+nlxx' +SECRET_KEY = os.getenv("SECRET_KEY") -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = ["pile.sdbs.cz"] +if os.getenv("DEV"): + DEBUG = True + ALLOWED_HOSTS = [] +else: + DEBUG = False + ALLOWED_HOSTS = ["pile.sdbs.cz"] # Application definition