Set ALLOWED_HOSTS from .env

This commit is contained in:
PCoder 2019-09-26 15:16:07 +05:30
parent 3f37fe4826
commit 273a1acf01
2 changed files with 3 additions and 4 deletions

View file

@ -1,3 +1,4 @@
SECRET_KEY=ldskjflkdsnejnjsdnf SECRET_KEY=ldskjflkdsnejnjsdnf
DEBUG=False DEBUG=False
ENABLE_DEBUG_LOG=True ENABLE_DEBUG_LOG=True
ALLOWED_HOSTS=localhost,.ungleich.ch

View file

@ -132,9 +132,7 @@ DEBUG_DATABASES = {
} }
DEBUG = config('DEBUG', False, cast=bool) DEBUG = config('DEBUG', False, cast=bool)
ALLOWED_HOSTS = [ ALLOWED_HOSTS = config('ALLOWED_HOSTS', default='localhost', cast=Csv)
".ungleich.ch"
]
DATABASES = { DATABASES = {
'default': { 'default': {