[Mpuls-commits] r672 - in wasko/branches/1.0: . waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Nov 3 09:51:25 CET 2009
Author: torsten
Date: 2009-11-03 09:51:24 +0100 (Tue, 03 Nov 2009)
New Revision: 672
Modified:
wasko/branches/1.0/ChangeLog.txt
wasko/branches/1.0/waskaweb/lib/validators.py
Log:
issue522
Modified: wasko/branches/1.0/ChangeLog.txt
===================================================================
--- wasko/branches/1.0/ChangeLog.txt 2009-11-03 08:13:22 UTC (rev 671)
+++ wasko/branches/1.0/ChangeLog.txt 2009-11-03 08:51:24 UTC (rev 672)
@@ -1,3 +1,9 @@
+2009-11-03 Torsten Irlaender <torsten.irlaender at intevation.de>
+
+ Issue522
+
+ * waskaweb/lib/validators.py: Allow alternative date formats
+
2009-11-02 Torsten Irlaender <torsten.irlaender at intevation.de>
Issue844 (waska)
Modified: wasko/branches/1.0/waskaweb/lib/validators.py
===================================================================
--- wasko/branches/1.0/waskaweb/lib/validators.py 2009-11-03 08:13:22 UTC (rev 671)
+++ wasko/branches/1.0/waskaweb/lib/validators.py 2009-11-03 08:51:24 UTC (rev 672)
@@ -54,7 +54,10 @@
def _to_python(self, value, state):
value.strip()
try:
- d = time.strptime(value, locale.nl_langinfo(locale.D_FMT))
+ try:
+ d = time.strptime(value, locale.nl_langinfo(locale.D_FMT))
+ except:
+ d = time.strptime(value, locale.nl_langinfo(locale.D_FMT).lower())
return datetime.date(d[0], d[1], d[2])
except:
raise formencode.Invalid(self.message("wrong_format", state), value, state)
More information about the Mpuls-commits
mailing list