[Mpuls-commits] r554 - in wasko/trunk: . waskaweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jul 28 15:14:47 CEST 2009
Author: torsten
Date: 2009-07-28 15:14:42 +0200 (Tue, 28 Jul 2009)
New Revision: 554
Modified:
wasko/trunk/ChangeLog.txt
wasko/trunk/waskaweb/model/case.py
Log:
Get Age of the kids
Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt 2009-07-28 12:41:28 UTC (rev 553)
+++ wasko/trunk/ChangeLog.txt 2009-07-28 13:14:42 UTC (rev 554)
@@ -74,6 +74,16 @@
waskaweb/templates/casemanagement/main.mako: Removed link to print
empty cases. Adopted traversal over the case to the new navigation.
+ Make loading the digest wirk again
+
+ * model/case.py,
+ controllers/case.py,
+ lib/navigation.py,
+ templates/casemanagement/digest_body.mako: Load casedata and use the
+ libformed for loading. Removed fields for secondary
+ telephonenumbers, as they may not be present. Did not implement such
+ logic to check wheter there is a second telephonenumer or not.
+
2009-07-16 Torsten Irlaender <torsten.irlaender at intevation.de>
Set version to 1.0.5
Modified: wasko/trunk/waskaweb/model/case.py
===================================================================
--- wasko/trunk/waskaweb/model/case.py 2009-07-28 12:41:28 UTC (rev 553)
+++ wasko/trunk/waskaweb/model/case.py 2009-07-28 13:14:42 UTC (rev 554)
@@ -29,7 +29,7 @@
import sys
import re
-from datetime import date, datetime
+from datetime import date, datetime, timedelta
import traceback
import psycopg2.extras
import codecs
@@ -761,6 +761,7 @@
'name',
'vorname',
'fn',
+ 'geburtsdatum',
'addresse_strasse',
'addresse_strassenr',
'addresse_plz',
@@ -808,7 +809,8 @@
self.telephone_more = F.NA(unicode(str(result.get('addresse_weiteretelefonnummern', '')), 'utf-8')).replace('\n', '<br>')
self.email = unicode(str(result.get('addresse_email', '')), 'utf-8')
- #self.age = result.get('alter') and "%.0f" % result.get('alter') or "0"
+ td = date.today() - result .get('geburtsdatum', date.today())
+ self.age = td.days/365 or ""
self.statement = (result.get('einverstaendniserklaerung') >= 0)
# Parents of the kids
More information about the Mpuls-commits
mailing list