From ff15b73bc3c7c6b1b4a374f773f1e57ddf359c0e Mon Sep 17 00:00:00 2001 From: A M Corvi Date: Sat, 29 Jul 2017 07:07:30 -0400 Subject: [PATCH] - Added: addtional db configuration adjustment --- amcorvi_site/settings.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/amcorvi_site/settings.py b/amcorvi_site/settings.py index e7e781f..1738750 100644 --- a/amcorvi_site/settings.py +++ b/amcorvi_site/settings.py @@ -93,10 +93,10 @@ # PostgresSQL Docker configuration "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", - "NAME": os.environ.get("DBNAME", True), - "USER": os.environ.get("DBUSER", True), - "PASSWORD": os.environ.get("DBPASS", True), - "HOST": "", + "NAME": os.getenv("DBNAME"), + "USER": os.getenv("DBUSER"), + "PASSWORD": os.getenv("DBPASS"), + "HOST": os.getenv("DBHOST"), "PORT": "5432", } @@ -116,6 +116,8 @@ # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), #} } +import dj_database_url +DATABASES['default'] = dj_database_url.config() # Password validation