[Mpuls-commits] r1948 - in wasko/branches/1.0: . waskaweb/i18n/de/LC_MESSAGES waskaweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Mar 15 15:36:19 CET 2010


Author: roland
Date: 2010-03-15 15:36:17 +0100 (Mon, 15 Mar 2010)
New Revision: 1948

Modified:
   wasko/branches/1.0/ChangeLog.txt
   wasko/branches/1.0/waskaweb/i18n/de/LC_MESSAGES/waskaweb.mo
   wasko/branches/1.0/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
   wasko/branches/1.0/waskaweb/model/casexml.py
Log:
Add the rules for CM start and end date to the import/export functions

Modified: wasko/branches/1.0/ChangeLog.txt
===================================================================
--- wasko/branches/1.0/ChangeLog.txt	2010-03-15 11:10:16 UTC (rev 1947)
+++ wasko/branches/1.0/ChangeLog.txt	2010-03-15 14:36:17 UTC (rev 1948)
@@ -1,3 +1,9 @@
+2010-03-15	Roland Geider <roland.geider at intevation.de>
+
+	Add the rules for CM start and end date to the import/export functions
+
+	* waskaweb/model/casexml.py: Add rules for CM start and end date
+
 2010-03-11	Roland Geider <roland.geider at intevation.de>
 
 	Don't block the date 1.1.2010

Modified: wasko/branches/1.0/waskaweb/i18n/de/LC_MESSAGES/waskaweb.mo
===================================================================
(Binary files differ)

Modified: wasko/branches/1.0/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
===================================================================
--- wasko/branches/1.0/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po	2010-03-15 11:10:16 UTC (rev 1947)
+++ wasko/branches/1.0/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po	2010-03-15 14:36:17 UTC (rev 1948)
@@ -453,7 +453,7 @@
 
 #: waskaweb/templates/main.mako:133
 msgid "footer_version"
-msgstr "11.03.2010 | Version 1.2.0"
+msgstr "15.03.2010 | Version 1.2.0"
 
 #: waskaweb/templates/main_login.mako:39
 msgid "main_login_bmf_phrase"

Modified: wasko/branches/1.0/waskaweb/model/casexml.py
===================================================================
--- wasko/branches/1.0/waskaweb/model/casexml.py	2010-03-15 11:10:16 UTC (rev 1947)
+++ wasko/branches/1.0/waskaweb/model/casexml.py	2010-03-15 14:36:17 UTC (rev 1948)
@@ -49,6 +49,7 @@
 import re
 
 from datetime import timedelta
+import datetime
 
 UUID_RE = re.compile(r"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")
 
@@ -479,6 +480,16 @@
         for var, value in self.data:
             old_value = get_data(var)
             if old_value == value: continue
+            
+            # Check dates for cm_start and cm_end
+            if var in ['datum_cm_start', 'datum_cm_ende']:
+                if value < datetime.date(2010, 01, 01):
+                    if var == 'datum_cm_start':
+                        datum = 'Datum Beginn der Umsetzung des Case Management'
+                    else:
+                        datum = 'Datum Ende Case Management'
+                    errors.append('%s darf nicht vor dem 1.1.2010 liegen' % datum)
+                    continue
 
             rules = self.formed.getRulesForVariable(var)
             okay = True



More information about the Mpuls-commits mailing list