1👍
Set verbose_name on the dollar_amount field to “price.”
Edit:
class PurchaseOrder(models.Model):
product = models.CharField(max_length=256)
dollar_amount = models.FloatField(verbose_name='Price')
0👍
in models.py:
class PurchaseOrder(models.Model):
product = models.CharField(max_length=256)
dollar_amount = models.FloatField()
def price(self):
return self.dollar_amount
in admin.py:
class PurchaseOrderAdmin(admin.ModelAdmin):
list_display=('product','price')
- [Answer]-Realistic data generator package available for Django
- [Answer]-Error in Django Template Blocks
- [Answer]-Redirect url in Django 1.4.5
Source:stackexchange.com