Is there a way to remove trailing zeros from a field Decimalin a django template?
This is what I have: 0.0002559000and this is what I need: 0.0002559.
There are answers suggesting to do this using a filter floatformat:
{{ balance.bitcoins|floatformat:3 }}
However, it floatformatperforms rounding (up or down), which is undesirable in my case, since I only need to remove trailing zeros without any rounding.
source
share