[Mpuls-commits] r4436 - base/trunk/mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Dec 28 11:30:22 CET 2010
Author: torsten
Date: 2010-12-28 11:30:22 +0100 (Tue, 28 Dec 2010)
New Revision: 4436
Modified:
base/trunk/mpulsweb/lib/app_globals.py
Log:
* mpulsweb/lib/app_globals.py: Setup evaluation search on app startup
Modified: base/trunk/mpulsweb/lib/app_globals.py
===================================================================
--- base/trunk/mpulsweb/lib/app_globals.py 2010-12-28 10:27:56 UTC (rev 4435)
+++ base/trunk/mpulsweb/lib/app_globals.py 2010-12-28 10:30:22 UTC (rev 4436)
@@ -125,12 +125,22 @@
self._init_case()
def _init_case(self):
+ from mpulsweb.model.agency import MpulsAgencyFactory, MpulsAgency
"""Set the mpuls application specific case classes"""
case_module = import_overridable_module("model.case")
self.case = case_module.Case
+ self.agency = MpulsAgency
+
self.case.set_fields(self.mpuls_config.get("case", "fields"))
+ self.agency.set_fields(self.mpuls_config.get("agency", "fields"))
+
self.case_factory = case_module.CaseFactory(self.case)
+ self.agency_factory = MpulsAgencyFactory(self.agency)
+
search_module = import_overridable_module("lib.search")
self.case_search = search_module.CaseSearch(
self.case_factory.get_search_retrieve_fields(),
self.case_factory.get_search_match_fields())
+ self.eval_search = search_module.EvaluationSearch(
+ self.agency_factory.get_search_retrieve_fields(),
+ self.agency_factory.get_search_match_fields())
More information about the Mpuls-commits
mailing list