18👍
✅
Seen here:
You can use the floatformat filter with a negative argument!
The answer would be:
{{ value.item_total|floatformat }}
10👍
you have to use Built-in template tags and filters (https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#get-digit). In your case use
{{ value.item_total|floatformat:"0" }}
Thats it.
Greetings
👤bofh
- [Django]-Django can't process non-ascii symbols
- [Django]-Django flatpages and images
- [Django]-OneToMany Relationship for more generic django apps
Source:stackexchange.com