From 762d39b5e9d10998a472ded275afdb28529ca53b Mon Sep 17 00:00:00 2001 From: Shirlei Chaves <shirlei@gmail.com> Date: Tue, 5 May 2015 19:28:28 -0300 Subject: [PATCH] Add ALLOWED_HOSTS setting --- settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/settings.py b/settings.py index eab44a0..afc60ee 100644 --- a/settings.py +++ b/settings.py @@ -78,6 +78,12 @@ STATIC_URL = '/media/' # Make this unique, and don't share it with anybody. SECRET_KEY = get_from_env('SECRET_KEY', 'replaceme') +# If debug is set to false and ALLOWED_HOSTS is not declared, django raises "CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False." +# If in production, you got a bad request (400) error +#More info: https://docs.djangoproject.com/en/1.7/ref/settings/#allowed-hosts (same for 1.6) + +ALLOWED_HOSTS = ['localhost'] # change to your allowed hosts + # Secure Stuff if (get_from_env('SSL', '0') == '1'): SECURE_SSL_REDIRECT = True -- GitLab