]> jspc29.x-matter.uni-frankfurt.de Git - mvd_epics.git/commitdiff
DASH: fixing numeric value rounding in jinja2
authorPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Mon, 14 Aug 2017 13:04:01 +0000 (15:04 +0200)
committerPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Mon, 14 Aug 2017 13:04:01 +0000 (15:04 +0200)
python_suite/dashboard/views/pv_overview.jinja2

index 716f26249ea7aa16c8d7431baaf07db0ac5bc2cc..d1e3a28bafeb5eb544803172a99554dd4eb3ec5f 100644 (file)
@@ -38,7 +38,7 @@
                                                                        </label>
                                                                {% else %}
                                                                        {% if PV.precision is number %}
-                                                                               {{ PV.value|round(PV.precision) }}
+                                                                               {{ ("%."+PV.precision|string +"f") % PV.value }}
                                                                        {% else %}
                                                                                {{ PV.value }}
                                                                        {% endif %}