瀏覽代碼

load debug var from environment

master
erichhasl 8 年之前
父節點
當前提交
80a91594da
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. +5
    -1
      web_dev/sas_web/sas_web/settings.py

+ 5
- 1
web_dev/sas_web/sas_web/settings.py 查看文件

@@ -24,7 +24,11 @@ SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY',
'dnwe1fairy&@7=qoe7(w0bahnt9(&%zn8bph5&-r$1*s2$d2@h')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
debug = os.environ.get('DJANGO_DEBUG', None)
if debug:
DEBUG = False if debug == '0' else True
else:
DEBUG = True

allowed = os.environ.get('DJANGO_ALLOWED_HOST', None)
if allowed is not None:


Loading…
取消
儲存