我有一个名为 {{value.item_total }} 的变量,它是 499.00,但我想在我的模板文件中删除该值的小数点,以便它 499。我怎么能这样做?
请您参考如下方法:
看到 here :
You can use the floatformat filter with a negative argument!
答案是:
{{ value.item_total|floatformat }}
我有一个名为 {{value.item_total }} 的变量,它是 499.00,但我想在我的模板文件中删除该值的小数点,以便它 499。我怎么能这样做?
请您参考如下方法:
看到 here :
You can use the floatformat filter with a negative argument!
答案是:
{{ value.item_total|floatformat }}