1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Pretty print feature

Prints the money of each user perfectly
This commit is contained in:
PA
2019-08-14 16:02:43 +02:00
parent 2a2e78f83f
commit a456468a71
3 changed files with 14 additions and 2 deletions

View File

View File

@ -0,0 +1,12 @@
from django import template
def pretty_money(value):
if value%100 == 0:
return str(value//100) + ''
else:
return str(value//100) + '' + str(value%100)
register = template.Library()
register.filter('pretty_money', pretty_money)