1
Fork 0

Add django-environ

This commit is contained in:
Jake Howard 2020-04-12 15:35:01 +01:00
parent 7cd38b5808
commit bf025dc31e
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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 = "*"