summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Hagedorn <hagedorn@mcs.anl.gov>2006-07-20 16:30:11 +0000
committerJoey Hagedorn <hagedorn@mcs.anl.gov>2006-07-20 16:30:11 +0000
commit8045ce9a8ad12f3900a2a92ab374a7f1ca655377 (patch)
treeaf5808ed8bf1c01d62eaa3259618c2ec14f2738d
parent845d5af81132a617d814a01716f0fe9a904d789c (diff)
downloadbcfg2-8045ce9a8ad12f3900a2a92ab374a7f1ca655377.tar.gz
bcfg2-8045ce9a8ad12f3900a2a92ab374a7f1ca655377.tar.bz2
bcfg2-8045ce9a8ad12f3900a2a92ab374a7f1ca655377.zip
New Reports: pointing settings.py file to read /etc/bcfg2.conf so less initial configuration is needed.
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1975 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--reports/brpt.sqlite (renamed from reports/brpt-db)bin669696 -> 669696 bytes
-rw-r--r--reports/brpt/settings.py19
2 files changed, 8 insertions, 11 deletions
diff --git a/reports/brpt-db b/reports/brpt.sqlite
index b2248d763..b2248d763 100644
--- a/reports/brpt-db
+++ b/reports/brpt.sqlite
Binary files differ
diff --git a/reports/brpt/settings.py b/reports/brpt/settings.py
index cd93abccf..63a7132ab 100644
--- a/reports/brpt/settings.py
+++ b/reports/brpt/settings.py
@@ -1,5 +1,8 @@
# Django settings for brpt project.
-
+from ConfigParser import ConfigParser, NoSectionError, NoOptionError
+c = ConfigParser()
+c.read(['/etc/bcfg2.conf'])#This needs to be configurable one day somehow
+sqlitedbpath = "%s/etc/brpt.sqlite" % c.get('server', 'repository')
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -10,16 +13,10 @@ ADMINS = (
MANAGERS = ADMINS
-#DATABASE_ENGINE = 'sqlite3' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
-#DATABASE_NAME = '/Users/joey/anl-mcs/dev/bcfg2/reports/brpt-db' # Or path to database file if using sqlite3.
-#DATABASE_USER = '' # Not used with sqlite3.
-#DATABASE_PASSWORD = '' # Not used with sqlite3.
-#DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
-#DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
-DATABASE_ENGINE = 'mysql' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
-DATABASE_NAME = 'brpt' # Or path to database file if using sqlite3.
-DATABASE_USER = 'brptadmin' # Not used with sqlite3.
-DATABASE_PASSWORD = 'sekret' # Not used with sqlite3.
+DATABASE_ENGINE = 'sqlite3' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
+DATABASE_NAME = sqlitedbpath # Or path to database file if using sqlite3.
+DATABASE_USER = '' # Not used with sqlite3.
+DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.