[Mpuls-commits] r5750 - base/trunk/mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Jan 5 10:56:53 CET 2012


Author: torsten
Date: 2012-01-05 10:56:48 +0100 (Thu, 05 Jan 2012)
New Revision: 5750

Modified:
   base/trunk/mpulsweb/controllers/evaluate.py
Log:
Added new function to add app specific conditions to search. This should be
overwritten in derived applications.


Modified: base/trunk/mpulsweb/controllers/evaluate.py
===================================================================
--- base/trunk/mpulsweb/controllers/evaluate.py	2012-01-05 09:53:28 UTC (rev 5749)
+++ base/trunk/mpulsweb/controllers/evaluate.py	2012-01-05 09:56:48 UTC (rev 5750)
@@ -252,6 +252,7 @@
         else:
             join_fkz = ""
         where_clauses.append(self.type_ending_clause(params))
+        where_clauses.append(self.appspecific_clause(form_result))
 
         params['sql'] = ("SELECT %%(fields)s from master_tbl_eval_total_view m"
                          " JOIN ka_status_tbl_view st on st.master_id = m.id"
@@ -275,6 +276,13 @@
         """
         return "TRUE"
 
+    def appspecific_clause(self, params):
+        """Return app-specific conditions to search based on different criteria.
+        Derived classes should override this if necessary as the details
+        are usually application specific.
+        """
+        return "TRUE"
+
     def evaluateAction(self):
         """Return an HTML file containing the result of one or more evaluations.
         """



More information about the Mpuls-commits mailing list