Skip to main content

django-admin-loading

Shows a full-page loading spinner whenever a form is submitted in the Django admin. Works with the stock admin and with django-unfold.

Install

pip install git+https://github.com/cheverebe/django-admin-loading.git

Setup

Add the app to INSTALLED_APPS before unfold and django.contrib.admin:

INSTALLED_APPS = [
    "django_admin_loading",  # must come first
    "unfold",                # optional
    "django.contrib.admin",
    ...
]

That's it. The app overrides admin/base.html (and, for Unfold, unfold/layouts/skeleton.html, which Unfold's login page extends directly). Each override extends the next template of the same name, so the original admin or Unfold layout is still used. Ordering matters because Django picks the first matching template in INSTALLED_APPS order.

Behaviour

  • The spinner appears on any submit event that wasn't cancelled with preventDefault(), so client-side validation and confirm dialogs don't leave it stuck.
  • It fades in after a short delay (150 ms), so instant responses don't flash it.
  • Forms or buttons opening a new tab (target="_blank") or using method="dialog" are ignored.
  • It is hidden again when a page is restored from the back/forward cache.
  • It follows light/dark mode (Django admin and Unfold) and uses the Unfold primary colour when present.

Opt out

<form data-no-spinner> ... </form>
<button type="submit" data-no-spinner>Export</button>

Use this for responses that download a file (e.g. CSV export actions): the page doesn't navigate away, so the spinner would otherwise stay up. You can also control it from JS:

DjangoAdminLoading.show();
DjangoAdminLoading.hide();

Customise

Override the CSS variables on #dal-overlay (--dal-color, --dal-bg) in your own stylesheet.

Development

uv pip install django django-unfold
DJANGO_SETTINGS_MODULE=tests.settings python -m django test tests                 # stock admin
WITH_UNFOLD=1 DJANGO_SETTINGS_MODULE=tests.settings python -m django test tests   # with unfold

License

MIT

Metadata

Release files for django-admin-loading 0.1.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-loading 0.1.0
File Size Uploaded Provenance
django_admin_loading-0.1.0.tar.gz 5.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-admin-loading 0.1.0
File Interpreter ABI Platform
django_admin_loading-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / django_admin_loading-0.1.0.tar.gz

Download URL django_admin_loading-0.1.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bcd2fe759955ac4bb7abb3c1535fe459f14a377212438ee64baf885bbb33d35f
BLAKE2b-256 checksum
How to use checksums
ba47f89949fa3ba574b63ef42955ca48a1521fe0d905d7c03f53848af5200568
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 Oct 19, 2026.

Transparency log

Release files / django_admin_loading-0.1.0-py3-none-any.whl

Download URL django_admin_loading-0.1.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd247acba5c49748d341eea71a92960a29fff04bd9b88fde5ec5d96bd559fb35
BLAKE2b-256 checksum
How to use checksums
7b80f38525f9f1dcbe42383bfd103cfab023295e302b213dbb2bb4c9dbf828f4
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 Oct 19, 2026.

Transparency log

Security for django-admin-loading 0.1.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_loading-0.1.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 19, 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.

Release history Release notifications | RSS feed

This release

0.1.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