Re: [Django] #9338: inline formset should have can_order=True when using order_with_respect_to (was: admin-interface: inline formset should have can_order=True when using order_with_respect_to)

7 views
Skip to first unread message

Django

unread,
Oct 2, 2020, 4:37:15 AM10/2/20
to django-...@googlegroups.com
#9338: inline formset should have can_order=True when using order_with_respect_to
-------------------------------------+-------------------------------------
Reporter: Patrick | Owner: nobody
Kranzlmueller |
Type: New feature | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => wontfix
* stage: Accepted => Unreviewed


Comment:

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)
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/9338#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Reply all
Reply to author
Forward
0 new messages