Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
maxpeterson opened this issue Mar 8, 2019 · 1 comment
Open

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

maxpeterson opened this issue Mar 8, 2019 · 1 comment

Comments

@maxpeterson
Copy link
Member

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

@meshy
Copy link
Collaborator

meshy commented Mar 10, 2019

Sounds like a good idea to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants