load debug var from environment

This commit is contained in:
erichhasl
2017-11-19 16:41:44 +01:00
parent 14f44f7819
commit 80a91594da
+4
View File
@@ -24,6 +24,10 @@ SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY',
'dnwe1fairy&@7=qoe7(w0bahnt9(&%zn8bph5&-r$1*s2$d2@h') 'dnwe1fairy&@7=qoe7(w0bahnt9(&%zn8bph5&-r$1*s2$d2@h')
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
debug = os.environ.get('DJANGO_DEBUG', None)
if debug:
DEBUG = False if debug == '0' else True
else:
DEBUG = True DEBUG = True
allowed = os.environ.get('DJANGO_ALLOWED_HOST', None) allowed = os.environ.get('DJANGO_ALLOWED_HOST', None)