[Mpuls-commits] r1226 - wasko/branches/2.0/mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Feb 4 10:59:07 CET 2010


Author: torsten
Date: 2010-02-04 10:59:06 +0100 (Thu, 04 Feb 2010)
New Revision: 1226

Modified:
   wasko/branches/2.0/mpulsweb/lib/base.py
Log:
* mpulsweb/lib/base.py: Get dbname, port, host and schemes for
  username and database name from config object and not from modul vars
  from lib.security



Modified: wasko/branches/2.0/mpulsweb/lib/base.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/base.py	2010-02-04 09:49:52 UTC (rev 1225)
+++ wasko/branches/2.0/mpulsweb/lib/base.py	2010-02-04 09:59:06 UTC (rev 1226)
@@ -44,8 +44,7 @@
 from mpulsweb.lib.timelog import timeLog
 
 import waskaweb.lib.helpers as h
-from waskaweb.lib.security import HOST, PORT, DBNAME, USER, getDbName, \
-     userIdentity
+from waskaweb.lib.security import getDbName, userIdentity
 
 import waskaweb.model as model
 
@@ -85,10 +84,10 @@
             user = session['USER_AUTHORIZED']
             dbname = getDbName()
 
-            self.db = db.DB(dbname=DBNAME % dbname,
-                            host=HOST,
-                            port=PORT,
-                            user=USER % (dbname, user.login),
+            self.db = db.DB(dbname=config.get('mpuls.db.database') % dbname,
+                            host=config.get('mpuls.db.host'),
+                            port=config.get('mpuls.db.port'),
+                            user=config.get('mpuls.db.user')% (dbname, user.login),
                             password=user.password)
             db.enter(self.db)
 



More information about the Mpuls-commits mailing list