Use the Csv helper for the KHAGANAT_HOSTNAMES config
This commit is contained in:
parent
d5e14a4d99
commit
5d367f3f49
1 changed files with 2 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue