From 07e7a01209e910f3825504016a0d2f1daff0dfeb Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Tue, 8 Aug 2017 21:30:31 -0700 Subject: [PATCH] Adds heroku database configuration and sets ALLOWED_HOSTS properly --- pinaxcon/settings.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index 0ed05d4..cc58113 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