add python decouple

This commit is contained in:
aatish 2018-10-26 14:55:13 +05:45
parent 730b02f673
commit d3ade15c9a
4 changed files with 8 additions and 4 deletions

2
.env.sample Normal file
View File

@ -0,0 +1,2 @@
DEBUG=True
ALLOWED_HOSTS=.localhost, .ipv6.work

View File

@ -1,2 +1,3 @@
docker build -t ipv6dotwork .
docker run -d -p 8000:8000 --name ipv6dotwork ipv6dotwork
docker run -d -p 127.0.0.1:8001:8000 --name ipv6dotwork ipv6dotwork

View File

@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
from decouple import config, Csv
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@ -23,10 +24,9 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '+0t^onasc-b+_ry$!6@hpf4o79rw6m%q7dow5#ia+@nla&2@0-'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
DEBUG = config('DEBUG', cast=bool, default=False)
ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv(), default="*")
# Application definition

View File

@ -2,3 +2,4 @@ Django==2.1.2
django-crispy-forms==1.7.2
git+https://github.com/yourlabs/django-autocomplete-light.git#egg=django-autocomplete-light
rules==2.0
python-decouple==3.1