小编use*_*580的帖子

如何获取十进制字段以在模板中显示更多小数位?

price_a = models.DecimalField(max_digits=5, decimal_places=3)
Run Code Online (Sandbox Code Playgroud)

示例价格:95,90

在我的模板中:

{{ price_a }}
Run Code Online (Sandbox Code Playgroud)

它只显示95,9.如何让它显示全价(额外的尾随0:95,90)?

django decimal django-templates

17
推荐指数
1
解决办法
1万
查看次数

标签 统计

decimal ×1

django ×1

django-templates ×1