[Mpuls-commits] r1319 - in wasko/branches/2.0: . waskaweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Feb 8 13:06:11 CET 2010


Author: bh
Date: 2010-02-08 13:06:10 +0100 (Mon, 08 Feb 2010)
New Revision: 1319

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/controllers/caselifetime.py
Log:
* waskaweb/controllers/caselifetime.py: Expand star imports.  This
it's more complicated because star imports were used for both
waskaweb.lib.base and mpulsweb.lib.helpers and some names are
exported by both.  Also, the star imports overwrote datetime which
before was the datetime class of the datetime module with the
datetime module itself.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-02-08 11:49:08 UTC (rev 1318)
+++ wasko/branches/2.0/ChangeLog	2010-02-08 12:06:10 UTC (rev 1319)
@@ -1,5 +1,14 @@
 2010-02-08  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/controllers/caselifetime.py: Expand star imports.  This
+	it's more complicated because star imports were used for both
+	waskaweb.lib.base and mpulsweb.lib.helpers and some names are
+	exported by both.  Also, the star imports overwrote datetime which
+	before was the datetime class of the datetime module with the
+	datetime module itself.
+
+2010-02-08  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/controllers/evaluate.py: Expand star imports.
 
 2010-02-08  Bernhard Herzog  <bh at intevation.de>

Modified: wasko/branches/2.0/waskaweb/controllers/caselifetime.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/caselifetime.py	2010-02-08 11:49:08 UTC (rev 1318)
+++ wasko/branches/2.0/waskaweb/controllers/caselifetime.py	2010-02-08 12:06:10 UTC (rev 1319)
@@ -7,8 +7,9 @@
 
 import formencode
 
-from waskaweb.lib.base import *
-from mpulsweb.lib.helpers import *
+from waskaweb.lib.base import c, g, render, request, session
+import mpulsweb.lib.helpers as h
+
 from waskaweb.lib.validators import \
      ExtraTimeFormValidator1, ExtraTimeFormValidator2, \
      ReopenFormValidator1, ReopenFormValidator1abgel, \
@@ -162,7 +163,7 @@
         id = session['case'].id
     logbook = Logbook(id)
     entry = LogbookEntry()
-    entry.datum = datetime.datetime.now()
+    entry.datum = datetime.now()
     entry.art = 0
     entry.kurz_notiz = header
     entry.notiz = text
@@ -373,7 +374,7 @@
                 last_date = D(it, 'cm_wiederauf_datum_bis_1', case_id)
                 if last_date:
                     c.form_result['cm_wiederauf_datum_bis_2'] = \
-                                  dd_mm_YYYY(last_date+timedelta(days=31*3))
+                                  h.dd_mm_YYYY(last_date+timedelta(days=31*3))
                 else:
                     c.form_result['cm_wiederauf_datum_bis_2'] = ''
             if c.num_verlaengerung < 1:
@@ -381,7 +382,7 @@
                 begin_cm = D(it, 'datum_cm_start', case_id)
                 if begin_cm:
                     c.form_result['cm_datum_verlaengerung_1'] = \
-                                   dd_mm_YYYY(begin_cm+timedelta(days=458))
+                                   h.dd_mm_YYYY(begin_cm+timedelta(days=458))
                 else:
                     c.form_result['cm_datum_verlaengerung_1'] = ''
 
@@ -390,7 +391,7 @@
                 ende_verl1 = D(it, 'cm_datum_verlaengerung_1', case_id)
                 if ende_verl1:
                     c.form_result['cm_datum_verlaengerung_2'] = \
-                                   dd_mm_YYYY(ende_verl1+timedelta(days=31*3))
+                                   h.dd_mm_YYYY(ende_verl1+timedelta(days=31*3))
                 else:
                     c.form_result['cm_datum_verlaengerung_2'] = ''
 



More information about the Mpuls-commits mailing list