From 07e7a01209e910f3825504016a0d2f1daff0dfeb 2017-08-09 18:30:11 From: Christopher Neugebauer Date: 2017-08-09 18:30:11 Subject: [PATCH] Adds heroku database configuration and sets ALLOWED_HOSTS properly --- diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index 0ed05d4b5539e3362bd663ebdc567d0907e50d07..cc58113e8d368e5210935427290d73b35680db7b 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -15,7 +15,12 @@ DATABASES = { } } -ALLOWED_HOSTS = [] +# HEROKU: Update database configuration with $DATABASE_URL. +import dj_database_url +db_from_env = dj_database_url.config() +DATABASES['default'].update(db_from_env) + +ALLOWED_HOSTS = ["localhost", ".herokuapp.com"] # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name