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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Aug 17 20:34:09 CEST 2010


Author: bh
Date: 2010-08-17 20:34:08 +0200 (Tue, 17 Aug 2010)
New Revision: 3429

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/search.py
Log:
* mpulsweb/lib/search.py (Search.supports_option): New.  To be
used by e.g. templates to determine which search options the
current application supports


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-08-17 18:32:13 UTC (rev 3428)
+++ base/trunk/ChangeLog	2010-08-17 18:34:08 UTC (rev 3429)
@@ -1,5 +1,11 @@
 2010-08-17  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/lib/search.py (Search.supports_option): New.  To be
+	used by e.g. templates to determine which search options the
+	current application supports
+
+2010-08-17  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/search.py (VALID_OPTIONS, Search.VALID_OPTIONS):
 	Move the list of valid options into the search classes so that
 	they can be extended derived mpuls applications.

Modified: base/trunk/mpulsweb/lib/search.py
===================================================================
--- base/trunk/mpulsweb/lib/search.py	2010-08-17 18:32:13 UTC (rev 3428)
+++ base/trunk/mpulsweb/lib/search.py	2010-08-17 18:34:08 UTC (rev 3429)
@@ -36,6 +36,10 @@
     def __init__(self):
         pass
 
+    @classmethod
+    def supports_option(self, option):
+        return option in self.VALID_OPTIONS
+
     def _parse_search_str(self, s):
         # TODO This is a very very simple approach. We should defentiley
         # implement some searchengine here



More information about the Mpuls-commits mailing list