summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyfoss/settings.py35
1 files changed, 28 insertions, 7 deletions
diff --git a/pyfoss/settings.py b/pyfoss/settings.py
index b977f68..2eae224 100644
--- a/pyfoss/settings.py
+++ b/pyfoss/settings.py
@@ -1,6 +1,6 @@
#Custom settings for pyfoss project.
from os.path import *
-import config
+from config import DB_NAME_DEFAULT, DB_USER_DEFAULT, DB_PASS_DEFAULT, DB_HOST_DEFAULT, DB_PORT_DEFAULT, DB_NAME_FOSSEEIN, DB_USER_FOSSEEIN, DB_PASS_FOSSEEIN, DB_HOST_FOSSEEIN, DB_PORT_FOSSEEIN
PROJECT_DIR = abspath(dirname(__file__) + '/../')
PYFOSS_DIR = PROJECT_DIR + '/pyfoss/'
@@ -17,18 +17,39 @@ ADMINS = (
MANAGERS = ADMINS
+#DATABASES = {
+# 'default': {
+# 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+# 'NAME': 'pyfoss', # Or path to database file if using sqlite3.
+ # The following settings are not used with sqlite3:
+# 'USER': config.db_username,
+# 'PASSWORD': config.db_password,
+# 'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
+# 'PORT': '', # Set to empty string for default.
+# }
+#}
+
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': 'pyfoss', # Or path to database file if using sqlite3.
- # The following settings are not used with sqlite3:
- 'USER': config.db_username,
- 'PASSWORD': config.db_password,
- 'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
- 'PORT': '', # Set to empty string for default.
+ 'NAME': DB_NAME_DEFAULT, # Or path to database file if using sqlite3.
+ 'USER': DB_USER_DEFAULT,
+ 'PASSWORD': DB_PASS_DEFAULT,
+ 'HOST': DB_HOST_DEFAULT, # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
+ 'PORT': DB_PORT_DEFAULT, # Set to empty string for default.
+ },
+ 'fossee_in': {
+ 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': DB_NAME_FOSSEEIN, # Or path to database file if using sqlite3.
+ 'USER': DB_USER_FOSSEEIN,
+ 'PASSWORD': DB_PASS_FOSSEEIN,
+ 'HOST': DB_HOST_FOSSEEIN, # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
+ 'PORT': DB_PORT_FOSSEEIN, # Set to empty string for default.
}
}
+
+
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = []