我在 admin.py 中有:
class PurchaseOrderAdmin(admin.ModelAdmin):
fields = ['product', 'dollar_amount']
在模型.py
class PurchaseOrder(models.Model):
product = models.CharField(max_length=256)
dollar_amount = models.FloatField()
我想将“dollar_amount”显示为“价格”。我该怎么做?