form中有货币相关的字段, 字段类型是Decimal,希望在template中显示为货币格式,比如:123,456.00。
尝试了django.contrib.humanize的方法:{{ '1234567.924'|floatformat:2|intcomma }},但发现humanize只能作用在单个tag上,而无法作用到template的form上。
清问,如何能将template中的form中的多个字段显示为货币格式?
form中有货币相关的字段, 字段类型是Decimal,希望在template中显示为货币格式,比如:123,456.00。
尝试了django.contrib.humanize的方法:{{ '1234567.924'|floatformat:2|intcomma }},但发现humanize只能作用在单个tag上,而无法作用到template的form上。
清问,如何能将template中的form中的多个字段显示为货币格式?