Opened 14 years ago

Closed 2 years ago

Last modified 2 years ago

#9338 closed New feature (wontfix)

inline formset should have can_order=True when using order_with_respect_to

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

Description

when using order_with_respect_to, the inline formset should have can_order=True, but it hasn´t.
this is important if one tries to hack the admin-interface, e.g. for implementing drag/drop-functionality with edit-inlines.

Attachments (1)

can_order_r15376.patch (1.4 KB) - added by Mathijs de Bruin 12 years ago.
Partial (and broken) work on a patch for r15376

Download all attachments as: .zip

Change History (9)

comment:1 Changed 14 years ago by Jacob

Triage Stage: UnreviewedAccepted

Changed 12 years ago by Mathijs de Bruin

Attachment: can_order_r15376.patch added

Partial (and broken) work on a patch for r15376

comment:2 Changed 12 years ago by Mathijs de Bruin

Cc: mathijs@… added
Has patch: set
Patch needs improvement: set

comment:3 Changed 12 years ago by Gabriel Hurley

Component: Contrib appscontrib.admin

comment:4 Changed 12 years ago by Luke Plant

Severity: Normal
Type: New feature

comment:5 Changed 11 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 Changed 11 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:7 Changed 2 years ago by Mariusz Felisiak

Resolution: wontfix
Status: newclosed
Summary: admin-interface: inline formset should have can_order=True when using order_with_respect_toinline formset should have can_order=True when using order_with_respect_to
Triage Stage: AcceptedUnreviewed

IMO we shouldn't implicitly set can_order when order_with_respect_to is True. We don't explicitly set this parameter anywhere else, and it will not be used by Admin itself. Described usage is quite niche and can be easily achieved by overriding get_formset(), e.g.

class MyInline(TabularInline):
    def get_formset(self, request, obj=None, **kwargs):
        kwargs['can_order'] = True
        return super().get_formset(request, obj, **kwargs)

comment:8 Changed 2 years ago by Mariusz Felisiak

... and it will not be used by Admin itself.

A complete drag & drop solution was proposed in #2137.

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