diff --git a/khaganat/settings.py b/khaganat/settings.py index 275375e..ac29bdf 100644 --- a/khaganat/settings.py +++ b/khaganat/settings.py @@ -12,7 +12,7 @@ https://docs.djangoproject.com/en/2.0/ref/settings/ from django.utils.translation import gettext_lazy as _ from django.urls import reverse_lazy -from decouple import config +from decouple import config, Csv import os @@ -29,10 +29,7 @@ SECRET_KEY = config('KHAGANAT_SECRET_KEY') # SECURITY WARNING: don't run with debug turned on in production! DEBUG = config('KHAGANAT_DEBUG', default=False, cast=bool) -ALLOWED_HOSTS = [ - _ for _ in config('KHAGANAT_HOSTNAMES', default='').split(',') - if _ != '' -] +ALLOWED_HOSTS = config('KHAGANAT_HOSTNAMES', default='', cast=Csv()) # Application definition