mirror of
https://github.com/pinry/pinry.git
synced 2026-01-11 01:32:05 +01:00
Refactor: Will not force user to set SECRET_KEY in environ
+ Allow overwrite in local_settings.py (the original implemetation will cause an KeyError)
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
import logging
|
||||
|
||||
from .base import *
|
||||
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = os.environ['SECRET_KEY']
|
||||
if 'SECRET_KEY' not in os.environ:
|
||||
logging.warning(
|
||||
"No SECRET_KEY given in environ, please have a check"
|
||||
)
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY', None)
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
|
||||
Reference in New Issue
Block a user