From 281336b025a8ea49554b605f0548c2ed7aa4c6cf Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Fri, 29 Mar 2013 12:19:25 -0400 Subject: [PATCH] use setting from planetstack config file --- plstackapi/planetstack/settings.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plstackapi/planetstack/settings.py b/plstackapi/planetstack/settings.py index a477452..9af30d9 100644 --- a/plstackapi/planetstack/settings.py +++ b/plstackapi/planetstack/settings.py @@ -9,14 +9,16 @@ ADMINS = ( MANAGERS = ADMINS +from plstackapi.planetstack.config import Config +config = Config() DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': 'planetstack', # Or path to database file if using sqlite3. + 'NAME': config.db_name, # Or path to database file if using sqlite3. # The following settings are not used with sqlite3: - 'USER': 'postgres', - 'PASSWORD': 'password', - 'HOST': 'localhost', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. + 'USER': config.db_user, + 'PASSWORD': config.db_password, + 'HOST': config.db_host, # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. 'PORT': '', # Set to empty string for default. } } -- 2.47.0