Opened 22 months ago
Last modified 22 months ago
#34292 closed New feature
Support display function in InlineModelAdmin — at Version 1
Reported by: | Al Mahdi | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 4.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
InlineModelAdmin
doesn't support display function
from django.contrib import admin class SaleInline(admin.TabularInline): model = Sale @admin.display(description="Price") def cost(self, sale): return sale.price - sale.discount fields = ("product", "count", "cost")
FieldError
Unknown field(s) (cost) specified for Sale
Note:
See TracTickets
for help on using tickets.