Opened 15 years ago

Closed 15 years ago

#11250 closed (fixed)

InlineModelAdmin with can_delete

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

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 15 years ago.
admin_can_delete.diff (4.9 KB ) - added by Gabriel Farrell 15 years ago.

Download all attachments as: .zip

Change History (6)

by tangc, 15 years ago

Attachment: options.diff added

comment:1 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Gabriel Farrell, 15 years ago

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 by Gabriel Farrell, 15 years ago

Has patch: set

by Gabriel Farrell, 15 years ago

Attachment: admin_can_delete.diff added

comment:4 by Karen Tracey, 15 years ago

Resolution: fixed
Status: newclosed

This has been fixed, I believe by r12533.

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