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
DEBUG=False
ENABLE_DEBUG_LOG=True
ALLOWED_HOSTS=localhost,.ungleich.ch

View File

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