changeset 36:e5a03d63b3d9 default tip

Truncate, don’t round, temperatures displayed in HTML.
author Paul Fisher <paul@pfish.zone>
date Fri, 02 Jul 2021 20:38:11 -0400
parents 2f3473416c11
children
files weather_server/templates/index.html weather_server/templates/location.html
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/weather_server/templates/index.html	Fri Jul 02 20:36:56 2021 -0400
+++ b/weather_server/templates/index.html	Fri Jul 02 20:38:11 2021 -0400
@@ -21,7 +21,7 @@
                     <span>
                         {%- set reading = location.latest() -%}
                         {%- if reading -%}
-                            {{ reading.temp_f|round|int -}}
+                            {{ reading.temp_f|int -}}
                             &nbsp;°F
                         {%- else -%}
                             ???
--- a/weather_server/templates/location.html	Fri Jul 02 20:36:56 2021 -0400
+++ b/weather_server/templates/location.html	Fri Jul 02 20:38:11 2021 -0400
@@ -19,7 +19,7 @@
                 <span class="value">
                     <span class="pad"> </span>
                     <span class="n">
-                        {{- last_reading.temp_f|round|int -}}
+                        {{- last_reading.temp_f|int -}}
                     </span>
                     <span class="unit">&deg;F</span>
                 </span>
@@ -29,7 +29,7 @@
                 <span class="value">
                     <span class="pad"> </span>
                     <span class="n">
-                        {{- last_reading.dew_point_f|round|int -}}
+                        {{- last_reading.dew_point_f|int -}}
                     </span>
                     <span class="unit">&deg;F</span>
                 </span>