Opened 2 years ago
Closed 23 months ago
#34292 closed New feature (invalid)
Support display function in InlineModelAdmin
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
Change History (3)
comment:1 by , 2 years ago
Description: | modified (diff) |
---|
comment:2 by , 2 years ago
Version: | 4.2 → 4.1 |
---|
comment:3 by , 23 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
cost
should be added to the readonly_fields.Please don't use Trac as a support channel. Closing per TicketClosingReasons/UseSupportChannels.