is a generic drag-and-drop ordering package to sort objects in the list- and detail inline-views of the Django admin interface. This package offers simple mixin classes which enriches the functionality of any existing class derived from admin.ModelAdmin, admin.StackedInline or admin.TabularInline. It thus makes it very easy to integrate with existing models and their model admin interfaces.

Project home:

django-admin-sortable2 demo


Must not inherit from any special Model base class

Other plugins offering functionality to make list views for the Django admin interface sortable, offer a base class to be used instead of models.Model. This class then contains a hard coded position field, additional methods, and meta directives.

By using a mixin to enrich an existing class with sorting, we can integrate this Django-app into existing projects with minimal modification to the code base.

Intuitive List View

By adding a draggable area into one of the columns of the Django admin’s list view, sorting rows becomes very intuitive. Alternatively, rows can be selected using the checkbox and sorted as a group.

If rows have to be sorted accross pages, they can be selected using the checkbox and moved to any other page using an Admin action.

Support for Stacked- and Tabular Inlines

If a Django admin view uses InlineModelAdmin objects, and the related model provides an ordering field, then those inline models can be sorted in the detail view.


Copyright Jacob Rief and contributors.

Licensed under the terms of the MIT license.