[Mpuls-commits] r3437 - in waska/trunk: . waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Aug 18 12:18:24 CEST 2010
Author: bh
Date: 2010-08-18 12:18:24 +0200 (Wed, 18 Aug 2010)
New Revision: 3437
Modified:
waska/trunk/ChangeLog
waska/trunk/waskaweb/lib/search.py
Log:
* waskaweb/lib/search.py (CaseSearch.VALID_OPTIONS): Extend the
base class value with "gender"
(CaseSearch.get_gender_clause): New. Implement the gender search
criterion
Modified: waska/trunk/ChangeLog
===================================================================
--- waska/trunk/ChangeLog 2010-08-18 10:17:55 UTC (rev 3436)
+++ waska/trunk/ChangeLog 2010-08-18 10:18:24 UTC (rev 3437)
@@ -1,3 +1,10 @@
+2010-08-18 Bernhard Herzog <bh at intevation.de>
+
+ * waskaweb/lib/search.py (CaseSearch.VALID_OPTIONS): Extend the
+ base class value with "gender"
+ (CaseSearch.get_gender_clause): New. Implement the gender search
+ criterion
+
2010-08-17 Bernhard Herzog <bh at intevation.de>
* waskaweb/lib/search.py: Remove unused imports.
Modified: waska/trunk/waskaweb/lib/search.py
===================================================================
--- waska/trunk/waskaweb/lib/search.py 2010-08-18 10:17:55 UTC (rev 3436)
+++ waska/trunk/waskaweb/lib/search.py 2010-08-18 10:18:24 UTC (rev 3437)
@@ -37,6 +37,13 @@
class CaseSearch(CaseBaseSearch):
- pass
+ VALID_OPTIONS = (CaseBaseSearch.VALID_OPTIONS
+ + ("gender",))
+ def get_gender_clause(self, search, options):
+ gender = options.get("gender")
+ if gender is not None:
+ return "m.geschlecht = %s" % gender
+ return "TRUE"
+
# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
More information about the Mpuls-commits
mailing list