#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)
Change History (9)
comment:1 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 14 years ago
Attachment: | can_order_r15376.patch added |
---|
comment:2 by , 14 years ago
Cc: | added |
---|---|
Has patch: | set |
Patch needs improvement: | set |
comment:3 by , 14 years ago
Component: | Contrib apps → contrib.admin |
---|
comment:4 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:7 by , 4 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Summary: | admin-interface: inline formset should have can_order=True when using order_with_respect_to → inline formset should have can_order=True when using order_with_respect_to |
Triage Stage: | Accepted → Unreviewed |
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 , 4 years ago
... and it will not be used by Admin itself.
A complete drag & drop solution was proposed in #2137.
Partial (and broken) work on a patch for r15376