django-sortedm2m
django-sortedm2m copied to clipboard
A transparent sorted ManyToMany field for django.
Trying to deep dive into why, but it broke a bunch of unit tests when I upgrade to django 5. The symptoms I see, are ` print(list(some_model.the_sorted_m2m_field.all()))` Shows the items...
updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.6.0) - [github.com/pycqa/isort: 5.12.0 → 5.13.2](https://github.com/pycqa/isort/compare/5.12.0...5.13.2)
In the `SortedManyToManyField()` there's a reference ([line 235](https://github.com/jazzband/django-sortedm2m/blob/master/sortedm2m/fields.py#L235)) to `rel.is_hidden()`. `rel` is a `ManyToManyRel` object. But a recent commit on Django (https://github.com/django/django/commit/f65f8ab84ebd2fc9772d23a159e6178e1335bd8b) removed the `is_hidden()` method from that class, leaving...
The draggable/sortable feature were not working for elements dynamically added using "Add another XYZ" link. Fixes #201
The drag and drop sorting is not working in the models added as stackedInline in Django admin.
When I save an instance with SortedManyToManyField, rows of the intermediate table with selected values are re-created not updated. Even when no changes are made. Is this required behavior?
It used to work in Django 2.x, but now using `prefetch_related` on a SortedM2M fields make it an empty one.