Opened 8 years ago

Closed 7 years ago

#11250 closed (fixed)

InlineModelAdmin with can_delete

Reported by: tangc Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords: InlineModelAdmin, can_delete
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Let can_delete be configurable, such as:

    class NodeDetailInline(admin.TabularInline):
    model = NodeDetail
    extra = 3
    max_num = 3
    can_delete = False

Attachments (2)

options.diff (706 bytes) - added by tangc 8 years ago.
admin_can_delete.diff (4.9 KB) - added by Gabriel Farrell 7 years ago.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by tangc

Attachment: options.diff added

comment:1 Changed 7 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

comment:2 Changed 7 years ago by Gabriel Farrell

Component: Uncategorizeddjango.contrib.admin
Version: 1.0SVN

This is pretty much a duplicate of #8341, which brosner fixed by making subclassing easier, but nonetheless it's something I've wanted enough times as a simple attribute in TabularInline that I think it's worth considering for inclusion. Patch attached with necessary changes to tests and docs.

comment:3 Changed 7 years ago by Gabriel Farrell

Has patch: set

Changed 7 years ago by Gabriel Farrell

Attachment: admin_can_delete.diff added

comment:4 Changed 7 years ago by Karen Tracey

Resolution: fixed
Status: newclosed

This has been fixed, I believe by r12533.

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