Skip to content

Would it make sense to use list_editable to reorder? #54

@maxpeterson

Description

@maxpeterson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions