You can create your own template filter, which essentially does what you need by simply dividing the input by 100. For example:
in my_app / templatetags / currency_helper.py:
from django import template register = template.Library() @register.filter def to_currency(value): return float(value) / 100.0
Then in your template:
{% load currency_helper %} etc... {{item.price|to_currency}}
In addition, if I were you, I would save the currency values ββin your database as a decimal field to avoid a headache when doing this or with a rounding error.
source share