Opened 16 years ago

Closed 4 years ago

Last modified 4 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 14 years ago.
Partial (and broken) work on a patch for r15376

Download all attachments as: .zip

Change History (9)

comment:1 by Jacob, 16 years ago

Triage Stage: UnreviewedAccepted

by Mathijs de Bruin, 14 years ago

Attachment: can_order_r15376.patch added

Partial (and broken) work on a patch for r15376

comment:2 by Mathijs de Bruin, 14 years ago

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

comment:3 by Gabriel Hurley, 14 years ago

Component: Contrib appscontrib.admin

comment:4 by Luke Plant, 14 years ago

Severity: Normal
Type: New feature

comment:5 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:7 by Mariusz Felisiak, 4 years ago

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 by Mariusz Felisiak, 4 years ago

... 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