Get ALLOWED_HOSTS and DEBUG from .env

This commit is contained in:
PCoder 2019-02-17 18:08:36 +01:00
parent 8b61db8dee
commit 5ec63d8536

View file

@ -32,7 +32,9 @@ AUTH_LDAP_START_TLS = os.environ.get('LDAP_USE_TLS', False)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
ALLOWED_HOSTS = []
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', 'localhost')
DEBUG = os.environ.get('DEBUG', False)
INSTALLED_APPS = [
'django.contrib.admin',
@ -131,6 +133,3 @@ DATABASES = {
}
}
SECRET_KEY = os.environ.get('SECRET_KEY')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get('DEBUG', False)