Opened 14 years ago

Closed 13 years ago

Last modified 11 years ago

#14238 closed Uncategorized (invalid)

admin-interface and formsets: ordered_forms are not returned in case of errors

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

Description

ticket http://code.djangoproject.com/ticket/11801 seems to address this issue - though it´s not solved with the admin-interface yet.

an example:
I´m having tabular-inlines and I´m reordering the forms. now, in case of an error (somewhere, not necessarily within this formset), the forms are displayed in the wrong order (as before re-ordering them). solving this issue would allow for sortable inlines (e.g. with drag/drop-functionality).
of course, InlineModelAdmin needs something like can_order (which is currently not available).

Change History (3)

comment:1 by anonymous, 13 years ago

Cc: sehmaschine@… added

comment:2 by Julien Phalip, 13 years ago

Resolution: invalid
Status: newclosed

I think #11801 is a different issue. In your case, the forms are displayed in the wrong order probably because the objects haven't been saved (because there was a validation error) and because the ordering is probably based on the values that are stored in the database and not the values that are temporarily "stored" in the forms. It looks like you would have to use some custom javascript to reorder the inlines based on the values that are in the forms.

In any case, there's not much we can do without seeing any specific test case, so I'm marking this ticket as invalid. Feel free to reopen if you can provide such a detailed test case (e.g. models, admin configurations, etc). You may also try asking for help on the Django user mailing list: http://groups.google.com/group/django-users/topics

comment:3 by sehmaschine@…, 11 years ago

Easy pickings: unset
Severity: Normal
Type: Uncategorized
UI/UX: unset

You have explained the testcase yourself – the problem is that the forms are ordered by the stored/database value instead of the form–value.

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