Skip to main content

django-admin-ordering – Orderable change lists and inlines done right^Wsimple

CI Status

Please refer to the CI build linked above for the currently supported combinations of Python and Django.

Installation

pip install django-admin-ordering, and add admin_ordering to INSTALLED_APPS.

Usage

First, you need a model ordered by an integer field. If you are happy with a model where 1. the ordering field is called ordering and 2. the ordering field is automatically initialized so that new objects are ordered last you can also inherit the abstract admin_ordering.models.OrderableModel model. If you define your own class Meta you should inherit OrderableModel.Meta so that the ordering attribute is set to the correct value:

from admin_ordering.models import OrderableModel

class MyModel(OrderableModel):
    # ...

    class Meta(OrderableModel.Meta):
        # ...

Orderable change lists

from admin_ordering.admin import OrderableAdmin

@admin.register(MyModel)
class MyModelAdmin(OrderableAdmin, admin.ModelAdmin):
    # The field used for ordering. Prepend a minus for reverse
    # ordering: "-ordering"
    # Doesn't have to be provided as long as you're using the default.
    # ordering_field = "ordering"

    # You may optionally hide the ordering field in the changelist:
    # ordering_field_hide_input = False

    # You may optionally add up/down arrows to reorder by click instead of dragging:
    # ordering_field_up_down_arrows = True

    # The ordering field can optionally be automatically renumbered when
    # the page loads. This may be useful if you have existing data which
    # isn't ordered yet.
    # ordering_field_renumber_on_load = False

    # The ordering field must be included both in list_display and
    # list_editable:
    list_display = ["name", "ordering"]
    list_editable = ["ordering"]

Orderable inlines

from admin_ordering.admin import OrderableAdmin

class MyModelTabularInline(OrderableAdmin, admin.TabularInline):
    model = MyModel

    # Same as above; "-ordering" is also allowed here:
    # ordering_field = "ordering"
    # ordering_field_hide_input = False
    # ordering_field_up_down_arrows = False
    # ordering_field_renumber_on_load = False

OrderableAdmin comes with a default of extra = 0 (no extra empty inlines shown by default). It is strongly recommended to leave the changed default as-is, because otherwise you’ll end up with invalid inlines just because you wanted to change the ordering.

Limitations

  • OrderableAdmin can be used both for inlines and parents, but this also means that you cannot register a model directly with OrderableAdmin.

  • Using django-admin-ordering with filtered or paginated lists may produce unexpected results. The recommendation right now is to set list_per_page to a bigger value and not reordering filtered changelists.

  • Note that django-admin-ordering assigns ordering values in increments of 10, emphasizing that the ordering value should not have any significance apart from giving relative ordering to elements.

Metadata

Release files for django-admin-ordering 0.22.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-admin-ordering 0.22.0
File Size Uploaded Provenance
django_admin_ordering-0.22.0.tar.gz 18.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-admin-ordering 0.22.0
File Interpreter ABI Platform
django_admin_ordering-0.22.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.8 kB

Release files / django_admin_ordering-0.22.0.tar.gz

Download URL django_admin_ordering-0.22.0.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d4f0e461ca71a0d3056bd6003ee2b1b34d8482c0d077ab780a0acf966c44f3d9
BLAKE2b-256 checksum
How to use checksums
a6f8353fb057328b2457dd107fc99ef62d761890015a7f85fba9ca4f21e093ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / django_admin_ordering-0.22.0-py3-none-any.whl

Download URL django_admin_ordering-0.22.0-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90fd713d01efe6f853d45e54930792be450c4cd7c1cf96777803c856599cbc25
BLAKE2b-256 checksum
How to use checksums
7eda62f6e34104b3ec250b0fb3aced6e1e73144995fa7d680e1c6917a9d31022
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for django-admin-ordering 0.22.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_admin_ordering-0.22.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.22.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page