[Mpuls-commits] r2099 - wasko/branches/2.0/mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Mar 24 12:49:30 CET 2010
Author: torsten
Date: 2010-03-24 12:49:30 +0100 (Wed, 24 Mar 2010)
New Revision: 2099
Modified:
wasko/branches/2.0/mpulsweb/lib/config.py
Log:
* mpulsweb/lib/config.py: Added new configuration option for default
search-date (used in evaluation now). Added config vars to set up the
default selected phases on adele and other evaluations. Configure a
new default evaluation.
Modified: wasko/branches/2.0/mpulsweb/lib/config.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/config.py 2010-03-24 11:48:50 UTC (rev 2098)
+++ wasko/branches/2.0/mpulsweb/lib/config.py 2010-03-24 11:49:30 UTC (rev 2099)
@@ -9,6 +9,7 @@
#
import os.path
+import datetime
import logging
import simplejson as json
@@ -253,6 +254,8 @@
}
]
set('search', 'cm_defaults', search_cm_default)
+ set('search', 'default-start-date', datetime.date(2009,9,1))
+ set('search', 'default-end-date', datetime.date(2009,12,31))
# LOGBOOK
# -------
@@ -263,12 +266,12 @@
# EVALUATIONS
# ------------
#
- dummy = {'name': 'Analyse', 'id': '4', 'config': 'eval_analyse.xml'}
+ # Note the the evaluation with id 0 is considered to be the Adele-evaluation
+ dummy = {'name': 'Vorgabe', 'id': '99', 'config': 'eval_default.xml'}
enabled_evaluations = [dummy]
set('evaluations', 'enabled', enabled_evaluations)
- set('evaluations', 'default-start-date-field', 'erstgespraech')
- set('evaluations', 'default-end-date-field',
- 'coalesce(datum_cm_ende, now())')
+ set('evaluations', 'adele-phases', [])
+ set('evaluations', 'default-phases', [])
return sections
@@ -276,14 +279,14 @@
try:
return self.get(section, name) == '1'
except:
- log.error('Error on checking config (%s, %s)' % (section, name))
+ log.exception('Error on checking config (%s, %s)' % (section, name))
return False
def get(self, section, name):
try:
return self.config[section][name]
except KeyError:
- log.error('Error on checking config (%s, %s)' % (section, name))
+ log.exception('Error on checking config (%s, %s)' % (section, name))
return ''
def get_app_name(self):
More information about the Mpuls-commits
mailing list