[Mpuls-commits] r750 - in wasko/branches/2.0: . waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Jan 13 11:20:26 CET 2010
Author: torsten
Date: 2010-01-13 11:20:25 +0100 (Wed, 13 Jan 2010)
New Revision: 750
Added:
wasko/branches/2.0/default.json
Modified:
wasko/branches/2.0/development.ini
wasko/branches/2.0/waskaweb/lib/app_globals.py
wasko/branches/2.0/waskaweb/lib/base.py
wasko/branches/2.0/waskaweb/lib/helpers.py
wasko/branches/2.0/waskaweb/lib/security.py
Log:
Worked on configuration
Added: wasko/branches/2.0/default.json
===================================================================
--- wasko/branches/2.0/default.json 2010-01-13 09:40:02 UTC (rev 749)
+++ wasko/branches/2.0/default.json 2010-01-13 10:20:25 UTC (rev 750)
@@ -0,0 +1,2 @@
+{
+}
Modified: wasko/branches/2.0/development.ini
===================================================================
--- wasko/branches/2.0/development.ini 2010-01-13 09:40:02 UTC (rev 749)
+++ wasko/branches/2.0/development.ini 2010-01-13 10:20:25 UTC (rev 750)
@@ -11,26 +11,24 @@
error_email_from = paste at localhost
formed_tree = ../../formed/formedtree_web.xml
-# for connections to PostgeSQL database
-# db_database: %s will be replaced by certificate value
-# db_user: first %s -> database name, second %s -> user
-db_name = mydb
-db_database = ka_%s_db
-db_user = ka_%s_%s
-db_host = 127.0.0.1
-db_port = 5432
-
-# Name of the application
-app_name = "Default application name"
-
-# for connections to PDF2XFA server
-#pdf2xfa_host = 192.168.11.17
-#pdf2xfa_port = 1111
-
# set this to 'false' if you do not want the application
# to handle static content.
serve_static = true
+# Name of the application
+mpuls.app.name = "Default application Name"
+# You can provide a user specific configuration for the mpuls server.
+mpuls.app.config=%(here)s/default.json
+
+# for connections to PostgeSQL database
+# db_database: %s will be replaced by certificate value
+# db_user: first %s -> database name, second %s -> user
+mpuls.db.name = mydb
+mpuls.db.database = ka_%s_db
+mpuls.db.user = ka_%s_%s
+mpuls.db.host = 127.0.0.1
+mpuls.db.port = 5432
+
[server:main]
use = egg:Paste#http
host = 0.0.0.0
@@ -54,11 +52,6 @@
#beaker.cache.data_dir = %(here)s/data/cache
#beaker.session.data_dir = %(here)s/data/sessions
-# You can provide a user specific configuration for the mpuls server.
-# In this file you can configure various things like the database connection,
-# enable or disable modules etc.
-#mpuls_config=%(here)s/myconfig.json
-
# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
# Debug mode will enable the interactive debugging tool, allowing ANYONE to
# execute malicious code after an exception is raised.
Modified: wasko/branches/2.0/waskaweb/lib/app_globals.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/app_globals.py 2010-01-13 09:40:02 UTC (rev 749)
+++ wasko/branches/2.0/waskaweb/lib/app_globals.py 2010-01-13 10:20:25 UTC (rev 750)
@@ -49,7 +49,7 @@
variable
"""
# Load mpuls configuration
- config_file = pylons.config['app_conf'].get('mpuls_config', 'mpuls.json')
+ config_file = pylons.config.get('mpuls.app.config', 'default.json')
if config_file:
if not os.path.isabs(config_file):
root = pylons.config.get('pylons.paths').get('root')
@@ -79,10 +79,10 @@
# data for database connections
- host = config.get('db_host')
- port = config.get('db_port')
- dbname = config.get('db_database')
- user = config.get('db_user')
+ host = config.get('mpuls.db.host')
+ port = config.get('mpuls.db.port')
+ dbname = config.get('mpuls.db.database')
+ user = config.get('mpuls.db.user')
if not host is None: security.HOST = host
if not port is None: security.PORT = int(port)
Modified: wasko/branches/2.0/waskaweb/lib/base.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/base.py 2010-01-13 09:40:02 UTC (rev 749)
+++ wasko/branches/2.0/waskaweb/lib/base.py 2010-01-13 10:20:25 UTC (rev 750)
@@ -66,6 +66,7 @@
def __before__(self):
# Determine if we have a server for normal use or for evalutation purpose.
+ log.debug(config.get('beaker.session.key'))
c.isEvaluationServer = config.get('evaluation_server', '0') == '1'
try:
Modified: wasko/branches/2.0/waskaweb/lib/helpers.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/helpers.py 2010-01-13 09:40:02 UTC (rev 749)
+++ wasko/branches/2.0/waskaweb/lib/helpers.py 2010-01-13 10:20:25 UTC (rev 750)
@@ -381,7 +381,7 @@
kaname = field[1]
except:
try:
- kaname = config.get('app_name')
+ kaname = config.get('mpuls.app.name')
except:
log.error("Could not fetch KA-name from client certificate")
return kaname
Modified: wasko/branches/2.0/waskaweb/lib/security.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/security.py 2010-01-13 09:40:02 UTC (rev 749)
+++ wasko/branches/2.0/waskaweb/lib/security.py 2010-01-13 10:20:25 UTC (rev 750)
@@ -213,7 +213,7 @@
return NEW_DBS.get(dbname, dbname)
except:
try:
- dbname = config.get('db_name')
+ dbname = config.get('mpuls.db.name')
return NEW_DBS.get(dbname, dbname)
except:
log.debug("Could not fetch database name from client certificate")
More information about the Mpuls-commits
mailing list