Compare commits
2 Commits
49b95253da
...
4e8682e53b
| Author | SHA1 | Date | |
|---|---|---|---|
|
4e8682e53b
|
|||
|
1143eba883
|
Binary file not shown.
@@ -14,6 +14,8 @@ import os
|
|||||||
import re
|
import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from django.core.management.utils import get_random_secret_key
|
||||||
|
|
||||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
|
|
||||||
@@ -22,10 +24,10 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = os.environ.get(
|
# Production supplies DJANGO_SECRET_KEY via the Kubernetes secret. If it is unset
|
||||||
"DJANGO_SECRET_KEY",
|
# (local dev), fall back to an ephemeral random key rather than a committed literal;
|
||||||
"f0arjg8q3ut4iuqrguqfjaruf0eripIZZN3t1kymy8ugqnj$li2knhha0@gc5v8f3bge=$+gbybj2$jt28uqm",
|
# sessions won't survive a restart, which is fine for development.
|
||||||
)
|
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY") or get_random_secret_key()
|
||||||
|
|
||||||
# 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("DEBUG", "True").lower() == "true"
|
DEBUG = os.environ.get("DEBUG", "True").lower() == "true"
|
||||||
|
|||||||
Reference in New Issue
Block a user