Skip to main content

Performance-oriented Django admin extensions.

Project description

django-admin-boost

PyPI version Python versions CI

Drop-in replacement for django.contrib.admin that works with Jinja2 (and DTL). Ships standalone performance mixins you can use with the stock Django admin too.

Features

  • Jinja2 admin templates — all 50 admin templates converted, with DTL fallback
  • Full drop-in replacement — swap django.contrib.admin for django_admin_boost.admin and everything just works
  • Standalone performance mixins — use ListOnlyFieldsMixin or EstimatedCountPaginator with stock Django admin, no full replacement needed
  • list_only_fields — automatic .only() on changelist querysets
  • Smart paginator — uses PostgreSQL's pg_class.reltuples for fast estimated counts on large tables

Quick Start

Full admin replacement (Jinja2)

# settings.py
INSTALLED_APPS = [
    "django_admin_boost.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    ...
]

TEMPLATES = [
    {
        "BACKEND": "django.template.backends.jinja2.Jinja2",
        "APP_DIRS": True,
        "OPTIONS": {
            "environment": "django_admin_boost.admin.jinja2_env.environment",
            "context_processors": [
                "django.template.context_processors.request",
                "django.contrib.auth.context_processors.auth",
                "django.contrib.messages.context_processors.messages",
            ],
        },
    },
    {
        "BACKEND": "django.template.backends.django.DjangoTemplates",
        "APP_DIRS": True,
        "OPTIONS": {
            "context_processors": [
                "django.template.context_processors.request",
                "django.contrib.auth.context_processors.auth",
                "django.contrib.messages.context_processors.messages",
            ],
        },
    },
]
# admin.py
import django_admin_boost.admin as admin

@admin.register(MyModel)
class MyModelAdmin(admin.ModelAdmin):
    list_display = ["name", "status", "created_at"]
    list_only_fields = ["id", "name", "status", "created_at"]

Just the performance mixins (with stock Django admin)

# settings.py
INSTALLED_APPS = ["django.contrib.admin", ...]
# admin.py
from django.contrib.admin import ModelAdmin
from django_admin_boost import ListOnlyFieldsMixin, EstimatedCountPaginator

class MyModelAdmin(ListOnlyFieldsMixin, ModelAdmin):
    list_only_fields = ["id", "name", "status"]
    paginator = EstimatedCountPaginator

Installation

pip install django-admin-boost

For Jinja2 support:

pip install django-admin-boost[jinja2]

Documentation

Full documentation at oliverhaas.github.io/django-admin-boost

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_admin_boost-0.1.0a1.tar.gz (475.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_admin_boost-0.1.0a1-py3-none-any.whl (593.0 kB view details)

Uploaded Python 3

File details

Details for the file django_admin_boost-0.1.0a1.tar.gz.

File metadata

  • Download URL: django_admin_boost-0.1.0a1.tar.gz
  • Upload date:
  • Size: 475.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_admin_boost-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 1892b9620410f2ee3737516f1d962e22c12259b66d60bfb2c0e1754242941472
MD5 8fd43ef71aee85e6390aed4521b16373
BLAKE2b-256 d61b08aa7d3cbf4770d9498b88a8c866e7ed718ed6ec318cdead62a4bec90a43

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_admin_boost-0.1.0a1.tar.gz:

Publisher: publish.yml on oliverhaas/django-admin-boost

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_admin_boost-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_admin_boost-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 80722cf35e9e527e0b55a21b71664f8bfa85bd1f54c4a7968b4c8df4cd872446
MD5 12fd898dd03158ec4b913f59cae16e64
BLAKE2b-256 467915c46eeb103a17a0e8ca4f660660e63fb1ef56f2b6e7df8521fd8c135736

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_admin_boost-0.1.0a1-py3-none-any.whl:

Publisher: publish.yml on oliverhaas/django-admin-boost

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page