Add python-decouple
I need to be able to auto-update the code on the server without losing config
This commit is contained in:
parent
13064a5640
commit
56e6d66582
|
@ -7,3 +7,4 @@
|
|||
stale_outputs_checked
|
||||
__pycache__
|
||||
Thoughts.iml
|
||||
.env
|
||||
|
|
|
@ -4,3 +4,4 @@ bleach~=3.3.0
|
|||
Pygments~=2.8.1
|
||||
Markdown~=3.3.4
|
||||
jetforce
|
||||
python-decouple
|
||||
|
|
|
@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
|
|||
"""
|
||||
|
||||
from pathlib import Path
|
||||
from decouple import config
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
@ -20,14 +21,14 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'qdm4_0b)3^)k$6r($!o^a7&0l#^6)@g2wr!x0r40ii@9otfnwo'
|
||||
SECRET_KEY = config("SECRET_KEY", default="qdm4_0b)3^)k$6r($!o^a7&0l#^6)@g2wr!x0r40ii@9otfnwo")
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
DEBUG = config(DEBUG, default=True)
|
||||
|
||||
ALLOWED_HOSTS = ["thoughts.learnerpages.com"]
|
||||
if DEBUG:
|
||||
ALLOWED_HOSTS = ["localhost"]
|
||||
ALLOWED_HOSTS = ["*"]
|
||||
|
||||
|
||||
# Application definition
|
||||
|
|
Loading…
Reference in New Issue