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

use*_*580 17 django decimal django-templates

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)?

Ala*_*air 41

floatformat例如,使用模板过滤器

{{ price_a|floatformat:2 }}
Run Code Online (Sandbox Code Playgroud)