You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
tolist_editable
and use javascript to update hiddensort_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
The text was updated successfully, but these errors were encountered: