[Mpuls-commits] r4535 - base/trunk/mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Jan 31 11:54:59 CET 2011


Author: torsten
Date: 2011-01-31 11:54:58 +0100 (Mon, 31 Jan 2011)
New Revision: 4535

Modified:
   base/trunk/mpulsweb/lib/renderer.py
Log:
* mpulsweb/lib/renderer.py
	(ViewRenderer._renderNumeric.uformat_numeric): Issue1712: Fixed
	formatting of numeric values in renderer. values are now preprocessed
	be the format_number function in lib/helpers.py which handles the
	localisation issue.


Modified: base/trunk/mpulsweb/lib/renderer.py
===================================================================
--- base/trunk/mpulsweb/lib/renderer.py	2011-01-31 10:30:26 UTC (rev 4534)
+++ base/trunk/mpulsweb/lib/renderer.py	2011-01-31 10:54:58 UTC (rev 4535)
@@ -41,7 +41,8 @@
 from formed.instance.backends.common import RuleEvalContext
 
 from mpulsweb.lib.helper.filters import NA, nl_to_br
-from mpulsweb.lib.helpers import tag, url_for, dd_mm_YYYY as format_date
+from mpulsweb.lib.helpers import tag, url_for, dd_mm_YYYY as format_date, \
+    format_number
 
 
 log = logging.getLogger(__name__)
@@ -604,7 +605,7 @@
         def uformat_numeric(value):
             if value == decimal.Decimal(-9999999):
                 return "unbekannt"
-            return value
+            return format_number(value)
 
         meta = self._getMeta(node)
         out = []



More information about the Mpuls-commits mailing list