debian: fix ALLOWED_HOSTS definition in settings.py

This commit is contained in:
Benjamin Dauvergne 2013-09-20 15:49:55 +02:00
parent fb4de63584
commit feacff7e43
1 changed files with 5 additions and 12 deletions

17
debian/settings.py vendored
View File

@ -25,7 +25,10 @@ DATABASES = {
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = os.environ['ALLOWED_HOSTS'].split(',')
if 'ALLOWED_HOSTS' in os.environ:
ALLOWED_HOSTS = os.environ['ALLOWED_HOSTS'].split(',')
else:
ALLOWED_HOSTS = [ '*' ]
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
@ -162,16 +165,6 @@ LOGGING = {
}
}
WCSINSTD_URL = os.environ.get('WCSINSTD_URL')
if WCSINSTD_URL:
INSTALLED_APPS += ('wcsinst.wcsinst',)
else:
INSTALLED_APPS += ('wcsinst.wcsinstd',)
INSTALLED_APPS += ('wcsinst.wcsinstd',)
WCSINST_WCSCTL_SCRIPT = os.environ.get('WCSINST_WCSCTL_SCRIPT', 'wcsctl')
try:
from local_settings import *
except ImportError:
pass