fix dev/prod settings

This commit is contained in:
Tomáš Mládek 2020-03-31 22:41:33 +02:00
parent 01e2c2d697
commit d1c17c3c73

View file

@ -19,11 +19,13 @@ 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!
if os.getenv("DEV"):
DEBUG = True
ALLOWED_HOSTS = []
else:
DEBUG = False
ALLOWED_HOSTS = ["pile.sdbs.cz"]
# Application definition