Skip to main content

django-yp-admin

PyPI version Python Django CI Documentation License: MIT

An htmx-powered theme + helpers for django.contrib.admin. Two dependencies. Zero jQuery.

django-yp-admin is an htmx-powered admin theme plus a small set of helpers for django.contrib.admin. It ships template overrides (Picnic CSS, native HTML5 widgets, htmx) and a handful of reusable abstract models and admin mixins (OrderedModel, SingletonModel, lightweight history, htmx widgets). It is not a full drop-in replacement for django.contrib.admin — it layers on top of the stock AdminSite.

Status: v0.1.2 stable. 105 tests across Python 3.11–3.14 × Django 4.2 / 5.2 / 6.0. Custom AdminSite subclasses and third-party admin packages (django-cms, wagtail, allauth, django-guardian, django-polymorphic, django-reversion, django-import-export) are not yet tested. Treat compat as roadmap, not promise.

What you get

  • htmx-powered theme. Template overrides for changelist/change form/login. Picnic CSS base, themable via CSS custom properties. Dark mode via prefers-color-scheme.
  • No jQuery. 39 KB gzip slim / 55 KB with Alpine.js instead of ~250 KB of jQuery + Select2 + xregexp.
  • Two mandatory deps. Django + django-htmx. Optional extras when you want them.
  • Native HTML5. <input type="date">, <dialog>, <details> instead of jQuery widgets.
  • Helpers (opt-in). Abstract models and admin mixins you can mix into your own code:
    • OrderedModel + drag-and-drop admin
    • SingletonModel + admin
    • Lightweight history (Revision/Version)
    • htmx-native filters (Dropdown, DateRange, DateTimeRange, NumericRange)
    • htmx + Tom Select autocomplete widget
    • htmx-native nested/sortable inlines

What is NOT yet supported / tested

The following are roadmap, not promises:

  • Custom AdminSite subclasses — untested.
  • django-cms, wagtail, allauth admin integrations — untested.
  • django-guardian (GuardedModelAdmin), django-polymorphic (PolymorphicChildModelAdmin), django-reversion (VersionAdmin), django-import-export (ImportExportModelAdmin) — not yet validated end-to-end.
  • Third-party themes that target legacy admin CSS classes — selectors are preserved as DOM hooks but not regression-tested.
  • Legacy admin JS extensions that depend on django.jQuery — will break.

If you depend on any of the above, stay on django.contrib.admin for now and watch this project.

Optional extras

pip install django-yp-admin[import-export]  # django-import-export

When django-import-export is installed, the matching admin integration in django_yp_admin.contrib activates automatically via importlib.util.find_spec.

Note: Lightweight history (Revision/Version) is built-in — no django-simple-history dependency needed. It uses GFK-based tables and is suitable when you don't need recovery or follow-FK features.

Quickstart

pip install django-yp-admin
INSTALLED_APPS = [
    "django_yp_admin",        # before django.contrib.admin
    "django.contrib.admin",
    "django_htmx",
    # ...
]

MIDDLEWARE = [
    # ...
    "django_htmx.middleware.HtmxMiddleware",
]

Open /admin/. Stock admins keep working with the new theme. To opt into htmx-native filters/widgets per model, switch your ModelAdmin base class to django_yp_admin.options.ModelAdmin.

Browser support

Modern browsers only — last 3 years of releases.

Browser Minimum
Firefox 115 (ESR, July 2023)
Chrome 115 (July 2023)
Safari 16.4 (March 2023)
Edge 115 (Chromium)

This unlocks native <dialog>, :has(), CSS nesting, container queries, reliable date inputs, and ES2022 — which is why the JS bundle is so small.

If you need legacy browser support, stick with django.contrib.admin.

Stack

Two output bundles:

Bundle Raw gzip
yp-admin.js (slim) 127 KB 39 KB
yp-admin-alpine.js (full) 174 KB 55 KB

Tom Select dominates the budget (~25 KB gzip). Alpine adds ~16 KB gzip.

vs the default admin's ~250 KB of jQuery + Select2 + xregexp + custom JS.

Status

v0.1.2 stable. 105 tests across Python 3.11–3.14 × Django 4.2 / 5.2 / 6.0. Star the repo, file issues, send PRs. Real-world compat reports against custom AdminSite and third-party admin packages are especially welcome.

License

MIT. © Yp Software info@ypsoftware.com.py.

Links

Metadata

Release files for django-yp-admin 0.1.2

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-yp-admin 0.1.2
File Size Uploaded
django_yp_admin-0.1.2.tar.gz 144.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-yp-admin 0.1.2
File Interpreter ABI Platform
django_yp_admin-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 298.1 kB

Release files / django_yp_admin-0.1.2.tar.gz

Download URL django_yp_admin-0.1.2.tar.gz
Size 144.8 kB
Tags Source
SHA-256 checksum
How to use checksums
65728b2c71870077537ad4dc84b82319f12d4a765c5e4aa980790cf232957113
BLAKE2b-256 checksum
How to use checksums
b26cd1afba22ac6767f98f95e0e59be645a16919142720e99772e91a9d8fe593
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 29, 2026.

Transparency log

Release files / django_yp_admin-0.1.2-py3-none-any.whl

Download URL django_yp_admin-0.1.2-py3-none-any.whl
Size 153.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fe7c9efd7f970449a1c0d01116f95f9880d92d2de8c20711abc3a86fe957e04
BLAKE2b-256 checksum
How to use checksums
2d4476110e254baf0258b14f28fc55bf4a458905d5bd3407f7a59732471a22e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 29, 2026.

Transparency log
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