1๐
โ
I found out the hint for this problem in a little unrelated issue here: https://github.com/jrief/django-admin-sortable2/issues/106
I had specified a "formset" in my TabularInline admin class. So, I just tried inheriting my inline formset class with "CustomInlineFormSet" class of django-admin-sortable2. Which solved the problem for me.
from adminsortable2.admin import CustomInlineFormSet, SortableInlineAdminMixin
class ABCInlineFormSet(CustomInlineFormSet, BaseInlineFormSet):
...
pass
class ABCAdminInline(SortableInlineAdminMixin, admin.TabularInline):
formset = ABCInlineFormSet
model = models.MyModel
fields = ["your_field"]
...
๐คGeekyShacklebolt
Source:stackexchange.com