Add django-environ
This commit is contained in:
parent
7cd38b5808
commit
bf025dc31e
2 changed files with 6 additions and 1 deletions
|
@ -2,3 +2,4 @@ django==3.0.5
|
||||||
django-debug-toolbar==2.2
|
django-debug-toolbar==2.2
|
||||||
whitenoise==5.0.1
|
whitenoise==5.0.1
|
||||||
brotli==1.0.7
|
brotli==1.0.7
|
||||||
|
django-environ==0.4.5
|
||||||
|
|
|
@ -12,6 +12,10 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import environ
|
||||||
|
|
||||||
|
env = environ.Env(DEBUG=(bool, False))
|
||||||
|
|
||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
@ -23,7 +27,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
SECRET_KEY = "gd(%^4!762m4y*c56t(ppm&-5+*a*6-&5)n%nc^aqfi%54^u_j"
|
SECRET_KEY = "gd(%^4!762m4y*c56t(ppm&-5+*a*6-&5)n%nc^aqfi%54^u_j"
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = env("DEBUG")
|
||||||
|
|
||||||
ALLOWED_HOSTS = "*"
|
ALLOWED_HOSTS = "*"
|
||||||
|
|
||||||
|
|
Reference in a new issue