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
|
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)
Resolution: |
→ invalid
|
Status: |
new → closed
|
Easy pickings: |
unset
|
Severity: |
→ Normal
|
Type: |
→ Uncategorized
|
UI/UX: |
unset
|
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