[Mpuls-commits] r1672 - in wasko/branches/2.0: . mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Feb 19 20:21:04 CET 2010


Author: bh
Date: 2010-02-19 20:21:03 +0100 (Fri, 19 Feb 2010)
New Revision: 1672

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (Field.default, Field.get_default): We
only need a getter for the default property so rename get_default
to default and use property as decorator.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-02-19 15:06:32 UTC (rev 1671)
+++ wasko/branches/2.0/ChangeLog	2010-02-19 19:21:03 UTC (rev 1672)
@@ -1,3 +1,9 @@
+2010-02-19  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/model/case.py (Field.default, Field.get_default): We
+	only need a getter for the default property so rename get_default
+	to default and use property as decorator.
+
 2010-02-18  Bernhard Herzog  <bh at intevation.de>
 
 	* waskaweb/model/case.py: Remove unused imports.

Modified: wasko/branches/2.0/mpulsweb/model/case.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/case.py	2010-02-19 15:06:32 UTC (rev 1671)
+++ wasko/branches/2.0/mpulsweb/model/case.py	2010-02-19 19:21:03 UTC (rev 1672)
@@ -148,15 +148,14 @@
         self.alias = alias
         self.alias_force_string = alias_force_string
 
-    def get_default(self):
+    @property
+    def default(self):
         """Return the default value when accessed via the alias name"""
         if self.alias_force_string:
             return ""
         else:
             return None
 
-    default = property(get_default)
-
     def convert(self, value):
         """Convert the value when accessed via the alias name.
         If alias_force_string is true, the value is forced to a unicode



More information about the Mpuls-commits mailing list