Would it make sense to use `list_editable` to reorder?
maxpeterson opened this issue · comments
The current implementation reorders the items by making Ajax calls to an custom admin endpoint to save the item each time the item is moved. This implementation was created before django admin supported list_editable
.
An alternative approach would be to add sort_order
to list_editable
and use javascript to update hidden sort_order
values when an item is moved. The items would be saved as a batch when the "Save" button was pressed.
While this would represent a orderable UI change, the new UI would be more consistent with the default django admin behaviour and it would be a UI that is more in common with the existing list editable orderable UI. Additionally it would also remove the custom admin endpoint in favor of leveraging the existing (well tested and maintained) Django code.
Worth considering in conjunction with #32
Sounds like a good idea to me.