Opened 7 years ago

Closed 7 years ago

Last modified 3 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@… 7 years ago.
Addition of can_delete and can_order
options.diff (966 bytes) - added by ciantic@… 7 years ago.
options.py (Is this correct diff file syntax?)

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by ciantic@…

Addition of can_delete and can_order

Changed 7 years ago by ciantic@…

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

comment:1 Changed 7 years ago by brosner

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

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 7 years ago by brosner

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

(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 4 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

comment:4 Changed 3 years ago by brillgen

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