diff options
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/templatetags/templatetags/f_to_c.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/lib/templatetags/templatetags/f_to_c.py b/app/lib/templatetags/templatetags/f_to_c.py new file mode 100644 index 0000000..343395a --- /dev/null +++ b/app/lib/templatetags/templatetags/f_to_c.py @@ -0,0 +1,7 @@ +from django import template +register = template.Library() + + +@register.filter +def f_to_c(temp): + return str(round((int(temp) - 32) * 5.0/9.0, 1)) |