.
This commit is contained in:
+7
-3
@@ -19,11 +19,15 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
with open("/etc/secret_key") as f:
|
||||
SECRET_KEY = f.read().strip()
|
||||
try:
|
||||
with open("/etc/secret_key") as f:
|
||||
SECRET_KEY = f.read().strip()
|
||||
except:
|
||||
SECRET_KEY = os.environ.get("SECRET_KEY")
|
||||
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
DEBUG = int(os.environ.get("DEBUG", default=0))
|
||||
|
||||
ALLOWED_HOSTS = [
|
||||
"localhost",
|
||||
|
||||
Reference in New Issue
Block a user