Skip to content
Simple object instance ordering for the Django administration change list.
Python JavaScript
Branch: master
Clone or download
This branch is 10 commits ahead of tkaemming:master.

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.



Adds simple, drag-and-drop object ordering to the Django administration change list view and to inlines within add/edit views.


Option A: pip

pip install -e "git://"

Option B: manual checkout

  1. Clone the django-orderable repository from GitHub.
  2. Run python install to install the module package.

Option C: PyPI



  1. Add orderable to the INSTALLED_APPS tuple for your Django project.
  2. Make sure you have Django staticfiles configured.

Define Your Models

For any models that you would like to add ordering to, have these models subclass orderable.models.OrderableModel.

Alternatively, (particularly if you are working with legacy data), you may subclass orderable.models.BaseOrderableModel. Then ensure that you define an order field (preferrably a PositiveIntegerField) and that you have defined ordering = ('order',) in your class Meta.

Adding Ordering to Change List View

Ensure that your model is orderable (see "Define Your Models" above).

Define your ModelAdmin class as usual, but subclass orderable.admin.OrderableAdmin instead of admin.ModelAdmin.

Note: Make sure that in your ModelAdmin, the list_per_page attribute is set to a value that is greater than the possible number of objects (this attribute defaults to 100). If you're looking to order an inordinate number of model instances, you might want to look elsewhere for your ordering solution.

Adding Orderable Administration Inlines

Ensure that the model being inlined (the "inner" model) is orderable (see "Define Your Models" above).

Define your inlines as usual, but subclass either orderable.admin.OrderableStackedInline or orderable.admin.OrderableTabularInline (instead of the standard admin.StackedInline or admin.TabularInline).

"Stacked" inlines can be dragged from the "header" of the item.

"Tabular" inlines can be dragged from anywhere inside the item row.


Please note that this isn't a fool-proof solution to ordering objects in every scenario. However, this app is useful for small applications where the change list will not be paginated beyond the first page of model instances. There are a lot of cases where this application isn't the appropriate solution (at least currently), such as objects that are ordered with respect to a related object, situations where the list_filter will be implemented, etc.

Example Application

A test application is bundled with this repository, showing an example of how to use OrderableModel, BaseOrderableModel and the various admin classes.

The source code and usage instructions can be found in the demosrc directory of this repository.


You can’t perform that action at this time.