This commit is contained in:
Ross
2022-05-03 18:34:33 +01:00
parent 8781f288a2
commit 4e58899e54
3 changed files with 33 additions and 5 deletions
+7 -3
View File
@@ -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",