[Mpuls-commits] r1642 - in wasko/branches/2.0: . waskaweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Feb 16 18:12:05 CET 2010
Author: bh
Date: 2010-02-16 18:12:04 +0100 (Tue, 16 Feb 2010)
New Revision: 1642
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/waskaweb/model/case.py
Log:
* waskaweb/model/case.py (CaseFactory.get_search_retrieve_fields)
(CaseFactory.get_search_match_fields)
(CaseFactory.get_session_fields): New. Frontend for the same
methods of the factory's case class so that they can easily be
used to retrieve this information for the class that the case
factory will instantiate.
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-02-16 16:55:13 UTC (rev 1641)
+++ wasko/branches/2.0/ChangeLog 2010-02-16 17:12:04 UTC (rev 1642)
@@ -1,5 +1,14 @@
2010-02-16 Bernhard Herzog <bh at intevation.de>
+ * waskaweb/model/case.py (CaseFactory.get_search_retrieve_fields)
+ (CaseFactory.get_search_match_fields)
+ (CaseFactory.get_session_fields): New. Frontend for the same
+ methods of the factory's case class so that they can easily be
+ used to retrieve this information for the class that the case
+ factory will instantiate.
+
+2010-02-16 Bernhard Herzog <bh at intevation.de>
+
* waskaweb/model/case.py (CaseFactory.__init__): New. Make it
possible to instantiate the CaseFactory with the case class to
instantiate. Default is to use Case from the same module.
Modified: wasko/branches/2.0/waskaweb/model/case.py
===================================================================
--- wasko/branches/2.0/waskaweb/model/case.py 2010-02-16 16:55:13 UTC (rev 1641)
+++ wasko/branches/2.0/waskaweb/model/case.py 2010-02-16 17:12:04 UTC (rev 1642)
@@ -361,6 +361,18 @@
case_cls = Case
self.case_cls = case_cls
+ def get_search_retrieve_fields(self):
+ """Frontend for the same method of the factory's case class"""
+ return self.case_cls.get_search_retrieve_fields()
+
+ def get_search_match_fields(self):
+ """Frontend for the same method of the factory's case class"""
+ return self.case_cls.get_search_match_fields()
+
+ def get_session_fields(self):
+ """Frontend for the same method of the factory's case class"""
+ return self.case_cls.get_session_fields()
+
def _build_preset(self, result):
return dict((name, result[name])
for name in self.case_cls.get_preset_fields()
More information about the Mpuls-commits
mailing list