Opened 10 years ago

Closed 10 years ago

#24185 closed Uncategorized (duplicate)

Inline object in TabularInline.get_readonly_fields

Reported by: Zach Borboa Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Zach Borboa Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The TabularInline.get_readonly_fields method should be able to programmatically determine the fields that will be displayed as read-only based on the inline object passed as the keyword argument instance_obj.

ModelAdmin.get_readonly_fields(request, obj=None)

obj is not the inline object, it's the parent. Ideally, both the parent and the inline object are available:

ModelAdmin.get_readonly_fields(request, obj=None, instance_obj=None)

Change History (3)

comment:2 by Zach Borboa, 10 years ago

Cc: Zach Borboa added

comment:3 by Tim Graham, 10 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #15602

Note: See TracTickets for help on using tickets.
Back to Top