django-sortedm2m icon indicating copy to clipboard operation
django-sortedm2m copied to clipboard

Add Autoincrementing sort value for reverse relationship modification

Open EricHigdon opened this issue 5 years ago • 0 comments

When modifying a sortedm2m relationship from the "to" model admin, the default sort value of 0 is used, which means new instance is added to the top of the sorted list. Ideally, new records would be sorted last be default.

Adding an m2m_changed listener for the intermediate model allows us to make sure that new records have a sort value higher than the last item already in the list.

EricHigdon avatar Jan 14 '20 15:01 EricHigdon