Opened 8 years ago

Closed 8 years ago

Last modified 4 years ago

#8341 closed Uncategorized (fixed)

InlineModelAdmin is missing `can_delete` and `can_order`

Reported by: ciantic@… Owned by: nobody
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: dev@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

InlineModelAdmin causes one to override whole function (get_formset) because it is missing, can_delete and can_order from the inlineformset_factory call.

P.S. Not related to this patch: Also there should be ability to give different form for change_view and add_view without such a big overriding.

Attachments (2)

options.py (966 bytes) - added by ciantic@… 8 years ago.
Addition of can_delete and can_order
options.diff (966 bytes) - added by ciantic@… 8 years ago.
options.py (Is this correct diff file syntax?)

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by ciantic@…

Attachment: options.py added

Addition of can_delete and can_order

Changed 8 years ago by ciantic@…

Attachment: options.diff added

options.py (Is this correct diff file syntax?)

comment:1 Changed 8 years ago by Brian Rosner

Triage Stage: UnreviewedAccepted

I have been meaning to add this in, but would rather do it in a subclass fashion to help prevent a million options at class-level. Some options there make sense, but more some more very formset specific bits need to be done by subclassing and providing your own kwargs to the factory function. Also your P.S, first, has nothing to do with this ticket and, two, you don't need to do "such big overriding" as the documentation clearly states you can use a form option on the ModelAdmin and InlineModelAdmin. See http://www.djangoproject.com/documentation/admin/#form

comment:2 Changed 8 years ago by Brian Rosner

Resolution: fixed
Status: newclosed

(In [8396]) Fixed #8341 -- Allow simpler subclassing of ModelAdmin and InlineModelAdmin when overriding get_form and get_formset and needing to pass keyword argument on to the factory functions. Thanks ciantic for the report.

comment:3 Changed 5 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

comment:4 Changed 4 years ago by Brillgen Developers

Cc: dev@… added
Easy pickings: unset
Severity: Normal
Type: Uncategorized
UI/UX: unset
Note: See TracTickets for help on using tickets.
Back to Top