I needed to have numbers that are not integers but also have halves 0.5
so I switched my model from IntegerField
to DecimalField
.
However, numbers now show as 5.00
which is way too burdening. What are my options to display the numbers without trailing zeros: 0.5
instead of 0.50
and 5
instead of 5.00
?
I am interested to know how to structure the framework to make that work - functions, decorators, or some kind of template tags or maybe some kind of localization. Someone that knows better should be able to dissect and explain the best choices.