Code

Opened 5 years ago

Closed 4 years ago

#11250 closed (fixed)

InlineModelAdmin with can_delete

Reported by: ctao 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 ctao 5 years ago.
admin_can_delete.diff (4.9 KB) - added by gsf 5 years ago.

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by ctao

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by gsf

  • Component changed from Uncategorized to django.contrib.admin
  • Version changed from 1.0 to SVN

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 5 years ago by gsf

  • Has patch set

Changed 5 years ago by gsf

comment:4 Changed 4 years ago by kmtracey

  • Resolution set to fixed
  • Status changed from new to closed

This has been fixed, I believe by r12533.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.