I want to use django-admin-sortable2 django-import-export package together in admin panel. Here is the code:
class University(models.Model):
name = models.CharField(max_length=50, help_text="University or Institution Name")
short_name = models.CharField(blank=True, max_length=10, help_text="University or Institution
Short Name")
order = models.PositiveIntegerField(
default=0,
blank=False,
null=False,
)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
def __str__(self):
return f'{self.id}-{self.name}'
class Meta:
ordering = ['order']
admin.py:
from import_export import resources
from import_export.admin import ImportExportModelAdmin
from adminsortable2.admin import SortableAdminMixin
# Register your models here.
class UniversityResource(resources.ModelResource):
class Meta:
model = University
exclude = ('created_at', 'updated_at',)
class UniveresityAdmin(ImportExportModelAdmin, SortableAdminMixin, admin.ModelAdmin):
resource_classes = [UniversityResource]
admin.site.register(University, UniveresityAdmin)
But this is not working, If I use:
class UniveresityAdmin(ImportExportModelAdmin, SortableAdminMixin, admin.ModelAdmin):
resource_classes = [UniversityResource]
Console:
failed to assign change_list_template attribute (see issue 1521)
If I use:
class UniveresityAdmin(ImportExportModelAdmin, SortableAdminMixin,):
class UniveresityAdmin(SortableAdminMixin, ImportExportModelAdmin,):
This provides:
TypeError at /admin/core/university/
join() argument must be str, bytes, or os.PathLike object, not 'list'
Both works single handed if I remove either one of them. But I want to use both package together. Is there any workaround to solve this issue? Thanks in advance.

