Support for order_with_respect_to
It would be nice if django-admin-sortable2 checked for order_with_respect_to. If it's enabled, repositioning queries could only update a subset of queryset (all records with the same value in order_with_respect_to field as the one being repositioned). This should be pretty easy to implement so I might come up with a pull request.
I never had a need for it, but it seems reasonable. Does this mean, that in such a case the positioning field is updated in the foreign object. How would you then tell django-admin-sortable2 which field it is.
@jrief No, the ordering field is automatically created on the model that is ordered. Field is called '_order' and is automatically set as first field in ordering field list. So django-admin-sortable2 already knows which field it is. The problem is with updating field's values. Django docs suggest using get_RELATED_order() and set_RELATED_order() which exist on foreign object when order_with_respect_to is used.
I will rethink about this, when I need this functionality myself. Feel free to create a pull request.
I was looking for the same trying to implement in admin https://docs.djangoproject.com/en/3.0/ref/models/options/#order-with-respect-to
Is there any update on this open issue?