Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
036ed6a3
Unverified
Commit
036ed6a3
authored
Nov 16, 2016
by
Joost Rijneveld
Browse files
Fix ALLOWED_HOSTS when env var is not set
parent
584f1ca0
Changes
1
Show whitespace changes
Inline
Side-by-side
website/thaliawebsite/settings/production.py
View file @
036ed6a3
...
@@ -22,7 +22,8 @@ SECRET_KEY = os.environ.get(
...
@@ -22,7 +22,8 @@ SECRET_KEY = os.environ.get(
# SECURITY WARNING: don't run with debug turned on in production!
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
os
.
environ
.
get
(
'DJANGO_DEBUG'
)
==
'True'
DEBUG
=
os
.
environ
.
get
(
'DJANGO_DEBUG'
)
==
'True'
ALLOWED_HOSTS
=
os
.
environ
.
get
(
'DJANGO_HOSTS'
,
''
).
split
(
','
)
if
'DJANGO_HOSTS'
in
os
.
environ
:
ALLOWED_HOSTS
=
os
.
environ
.
get
(
'DJANGO_HOSTS'
).
split
(
','
)
# Database settings
# Database settings
DATABASES
=
{
DATABASES
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment