Skip to content

Commit 86860ec

Browse files
committed
re-enabling new settings, manage.py for prod, modify settings prod
1 parent be10b0d commit 86860ec

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

egsim/settings/prod.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@
1919
# Apparently, with this 'request.scheme' correctly displays 'https' in production
2020
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
2121

22-
# SECRET_KEY SHOULD BE UNIQUE FOR EACH SETTINGS FILE AND CAN BE GENERATED ON THE
23-
# TERMINAL (WITHIN THE DJANGO VIRTUAL ENV) WITH THE COMMAND:
22+
# In production, you can generate the secret key via:
2423
# python -c "from django.core.management.utils import get_random_secret_key;print(get_random_secret_key())" # noqa
24+
# (Note: the generated output <O> has unsafe characters removed and can be safely set as SECRET_KEY=<O> in an env file)
2525
SECRET_KEY = os.environ["EGSIM_SECRET_KEY"]
2626

27-
__DATA_ROOT__ = Path(os.environ['EGSIM_DATA_ROOT'])
28-
2927
# path to the sqlite database (you may place it next to MEDIA_ROOT)
3028
DATABASES['default']['NAME'] = os.environ['EGSIM_DB_DEFAULT_NAME']
3129

manage.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
if not line or line.startswith("#"):
2222
continue
2323
key, value = line.split("=", 1)
24-
print(f'{key}={value}')
2524
os.environ.setdefault(key, value)
2625

2726
from django.core.management import execute_from_command_line

0 commit comments

Comments
 (0)