[Mpuls-commits] r4193 - in base/trunk: . mpulsweb/controllers mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Nov 16 12:24:55 CET 2010


Author: bh
Date: 2010-11-16 12:24:53 +0100 (Tue, 16 Nov 2010)
New Revision: 4193

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/controllers/evaluate.py
   base/trunk/mpulsweb/lib/config.py
Log:
* mpulsweb/controllers/evaluate.py (get_search_options): Fetch
type_ending defaults from config and copy previously values from
soptions.
(EvaluateController._get_evalparams): Use "type_ending" instead of
"ending" in params so that formfill will actually fill in the form.

* mpulsweb/lib/config.py (MpulsAppConfig.build_defaults): Add
emtpy defaults for type ending search for evaluations.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-11-16 10:52:36 UTC (rev 4192)
+++ base/trunk/ChangeLog	2010-11-16 11:24:53 UTC (rev 4193)
@@ -1,5 +1,16 @@
 2010-11-16  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/controllers/evaluate.py (get_search_options): Fetch
+	type_ending defaults from config and copy previously values from
+	soptions.
+	(EvaluateController._get_evalparams): Use "type_ending" instead of
+	"ending" in params so that formfill will actually fill in the form.
+
+	* mpulsweb/lib/config.py (MpulsAppConfig.build_defaults): Add
+	emtpy defaults for type ending search for evaluations.
+
+2010-11-16  Bernhard Herzog  <bh at intevation.de>
+
 	The last part of the base changes for mpuls/issue1264
 
 	* mpulsweb/templates/evaluation/evaluate_extra.mako: New.

Modified: base/trunk/mpulsweb/controllers/evaluate.py
===================================================================
--- base/trunk/mpulsweb/controllers/evaluate.py	2010-11-16 10:52:36 UTC (rev 4192)
+++ base/trunk/mpulsweb/controllers/evaluate.py	2010-11-16 11:24:53 UTC (rev 4193)
@@ -56,13 +56,14 @@
 
     # set default evaluation options.
     options['phase'] = g.mpuls_config.get('evaluations', 'default-phases')
+    options['type_ending'] = g.mpuls_config.get('evaluations', 'default-ending')
     options['start_date'] = g.mpuls_config.get_date('search',
                                                     'default-start-date')
     options['end_date'] = g.mpuls_config.get_date('search', 'default-end-date')
 
     # copy options from soptions if included there
     if soptions:
-        for name in ["start_date", "end_date", "phase"]:
+        for name in ["start_date", "end_date", "phase", "type_ending"]:
             if name in soptions:
                 options[name] = soptions[name]
 
@@ -111,7 +112,7 @@
         params['end_date'] = str(form_result['end_date'])
         params['typelist'] = form_result['typelist']
         params['phase'] = form_result['phase']
-        params['ending'] = form_result['type_ending']
+        params['type_ending'] = form_result['type_ending']
 
         where_clauses = []
 

Modified: base/trunk/mpulsweb/lib/config.py
===================================================================
--- base/trunk/mpulsweb/lib/config.py	2010-11-16 10:52:36 UTC (rev 4192)
+++ base/trunk/mpulsweb/lib/config.py	2010-11-16 11:24:53 UTC (rev 4193)
@@ -335,7 +335,8 @@
         set('evaluations', 'enabled', enabled_evaluations)
         set('evaluations', 'adele-phases', [])
         set('evaluations', 'default-phases', [])
-        
+        set('evaluations', 'default-ending', [])
+
         # VALIDITIES
         # -------------
         # Note that the grade of validity is defined by the ascending order of



More information about the Mpuls-commits mailing list