Skip to main content

django-admin-sortkey

Control the sort order of apps and models in the Django admin interface.

This is an independent, unofficial third-party package. It is not affiliated with or endorsed by the Django Software Foundation.

Install

pip install django-admin-sortkey

Add to INSTALLED_APPS before django.contrib.admin:

INSTALLED_APPS = [
    "django_admin_sortkey",
    "django.contrib.admin",
    ...
]

Usage

Sort apps in the admin index

# myapp/apps.py
from django.apps import AppConfig

class MyAppConfig(AppConfig):
    name = "myapp"
    app_sort = 10  # lower appears first; omit to sort alphabetically after explicit ones

Sort models within an app

# myapp/admin.py
from django.contrib import admin
from .models import Invoice

@admin.register(Invoice)
class InvoiceAdmin(admin.ModelAdmin):
    model_sort = 1  # lower appears first within the app section

Apps and models without an explicit sort value fall back to alphabetical ordering and appear after all explicitly sorted ones.

How it works

Patches AdminSite.get_app_list() once at app startup (AppConfig.ready()). No Django source modifications. Zero rebase maintenance.

Running tests

pip install -e ".[dev]"
pytest

License

BSD-3-Clause, matching Django's own license.

Release files for django-admin-sortkey 1.0.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-sortkey 1.0.0
File Size Uploaded
django_admin_sortkey-1.0.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-admin-sortkey 1.0.0
File Interpreter ABI Platform
django_admin_sortkey-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.2 kB

Release files / django_admin_sortkey-1.0.0.tar.gz

Download URL django_admin_sortkey-1.0.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d47852dc4bdb715a3816be70a584938ff2b1093d2c49b601298b6c9438718708
BLAKE2b-256 checksum
How to use checksums
5d70f3ea500ecbd86e4a21fc4a0f88fb747f3c1710f1323d80f3a2a759dfa127
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 14, 2026.

Transparency log

Release files / django_admin_sortkey-1.0.0-py3-none-any.whl

Download URL django_admin_sortkey-1.0.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e89a1f8322d66540a1cb1555a07a5afded940f0be8d6b6ea95ff4f440dfae68e
BLAKE2b-256 checksum
How to use checksums
3a1b955a676d4662d35002b339e9de8819627ff70e9a0f832530fbd4c6b2b3b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.0

2 release files

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