Move Django secret key to secrets.py

This commit is contained in:
2020-02-02 04:42:46 +00:00
parent c501eb3c1a
commit 0326950c54
2 changed files with 17 additions and 3 deletions
+3 -1
View File
@@ -13,6 +13,8 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
import os
import logging
from . import secrets
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -21,7 +23,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'tm2h!9@=+cqy#n^&2en9(dhyfc@n--9*$s*#b9&%rdai)jrj&f'
SECRET_KEY = secrets.DJANGO_SECRET_KEY
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG_ENV = os.environ.get('DEBUG', False)