From e485af3140ea57c36693f69a2e68b80967390e80 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Fri, 10 May 2013 17:15:32 -0400 Subject: [PATCH] pull some values from planetstack config file --- planetstack/planetstack/settings.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/planetstack/planetstack/settings.py b/planetstack/planetstack/settings.py index 8970c42..29e6285 100644 --- a/planetstack/planetstack/settings.py +++ b/planetstack/planetstack/settings.py @@ -1,4 +1,6 @@ # Django settings for planetstack project. +from config import Config +config = Config() DEBUG = True TEMPLATE_DEBUG = DEBUG @@ -12,11 +14,11 @@ MANAGERS = ADMINS 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': 'admin', - '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.43.0