Skip to main content
Django-Chassis

A declarative, fully typed chassis for building polished Django Admin applications.

Documentation · Quick start · API reference · Changelog

Published PyPI version Python 3.13, 3.14 and 3.15 Django 6.0 and 6.1 Typed package MIT license

Tests · Security checks · pre-commit.ci status


Django-Chassis gives a project a structured AdminSite, composable ModelAdmin options, custom pages, dashboard contracts, and a complete template overlay. Domain models and business rules stay in the project; Chassis provides the reusable Admin application layer around them.

Features

  • Declarative configuration — compose the Admin with ChassisAdminSiteMixin, ChassisAdminMixin, and immutable options.
  • A polished changelist — search, filters, date hierarchy, tabs, badges, pretty JSON, and decimal-amount presentation without ad-hoc template forks.
  • Row, list, and object actions — permission-aware buttons, confirmation, and condition methods.
  • Related data — independently paginated tables and typed repeatable inputs with native or application-owned form-data processing.
  • Custom pages — permission-aware pages, personal pages, information pages, and timelines.
  • Dashboard contracts — metrics, charts, alerts, actions, a four-column grid, and live refresh at dashboard/live/.
  • Import/export — JSON/XML in, JSON/XML/CSV/XLSX out, preview/apply, history, a shared worker protocol with optional Celery/Dramatiq providers.
  • Users and security — profiles, sessions, login-attempt limits, GeoIP country detection, and an Admin audit journal.
  • Observability — audit summaries, HTTP events, transfer history, and an optional database history supplied by the project.
  • Log redaction — required masks and optional extra field names from GlobalConfig.
  • Session risk — optional stored assessments, policy settings, and Celery scheduling for administrative sessions. Installed Django apps can register additional risk signals and their GlobalConfig settings. Session risk configuration
  • Notifications — a personal inbox with read comments and a permission-scoped system journal.
  • Fully typed — ships py.typed and is checked with Pyrefly in strict mode.

Compatibility

The source in this repository is Django-Chassis 1.0.24.

Python Minimum Django
3.13 or 3.14 6.0
3.15 6.1.3

Installation

pip install django-chassis

The package index lists the available releases and their Python requirements. Django-Chassis on PyPI

Put 'django_chassis' before 'django.contrib.admin' so package templates overlay the stock Admin:

INSTALLED_APPS = [
    'django_chassis',
    'django.contrib.admin',
    # ...
]

Configure the private STORAGES['media'] alias before Django starts. For a new project using Django's default storage setup, add the following to settings.

from django.conf import global_settings

STORAGES = {
    **global_settings.STORAGES,
    'media': {
        'BACKEND': 'django.core.files.storage.FileSystemStorage',
        'OPTIONS': {'location': BASE_DIR / 'private-media'}
    }
}

Keep this directory out of public media routes. If your project already defines STORAGES, add the media entry to that dictionary.

Background import/export is optional:

pip install 'django-chassis[dramatiq]'
# or
pip install 'django-chassis[celery]'

For WSGI projects, Chassis provides an optional Gunicorn management command:

pip install 'django-chassis[gunicorn]'
python manage.py run_gunicorn --port=8000 --workers=2

For ASGI projects, use the optional Uvicorn command:

pip install 'django-chassis[uvicorn,dramatiq]'
python manage.py run_uvicorn --host 127.0.0.1 --port 8000 --workers 1 --reload

run_uvicorn resolves ASGI_APPLICATION or an explicit --app; it does not require a project-specific server command. Extras can be combined. django-chassis[all] installs the Gunicorn, Uvicorn, Dramatiq, Celery, GlobalConfig, and document-editor extras. The base package has no optional server or worker runtime. Selecting an extra installs its dependencies; the application still configures its worker broker and database. For PostgreSQL jobs, install and configure the chosen PostgreSQL broker and driver in the application. Installing an extra does not enable import/export or start workers.

Quick start

Create a Chassis AdminSite, register a model, and mount the site in urls.py:

from django.contrib.admin import AdminSite, ModelAdmin
from django.urls import path
from django.utils.translation import gettext_lazy as _

from django_chassis.mixins import ChassisAdminMixin, ChassisAdminSiteMixin
from django_chassis.options import RowActionsOption, SearchOption

from catalog.models import Book


class CustomAdminSite(ChassisAdminSiteMixin, AdminSite):
    chassis_brand_name = _('My project')
    chassis_brand_logo_static_path = 'img/logo.png'


admin_site = CustomAdminSite(name='admin')


class BookAdmin(ChassisAdminMixin, ModelAdmin):
    options = [SearchOption(fields=['title', 'isbn']), RowActionsOption()]


admin_site.register(Book, BookAdmin)

urlpatterns = [path('admin/', admin_site.urls)]

ChassisAdminSiteMixin and ChassisAdminMixin must come before their Django classes in the MRO.

Documentation

Read the English documentation or the Russian documentation.

See the documentation README for local preview, builds, and screenshot verification.

Testing

Pushes to any branch and pull requests run security scans and dependency audits. On main, one CI run starts testing after the scans pass. For other protected branches, a successful push scan dispatches testing for the current branch head. The test pipeline runs Ruff, Pyrefly, and Django checks on Python 3.13, then tests Python 3.13, 3.14, and 3.15 against the locked and minimum Django versions. The pipeline also builds the Python package, runs JavaScript tests, and verifies both documentation languages. Publishing and documentation deployment scan the selected revision and reuse its successful test run on main. PyPI publishing requires the current head of main.

uv sync --group dev
uv run pytest

License

Distributed under the MIT License.

Support the project

Cryptocurrency & Bitcoin donation button by NOWPayments

Metadata

Release files for django-chassis 1.0.24

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-chassis 1.0.24
File Size Uploaded Provenance Actions
django_chassis-1.0.24.tar.gz 1.1 MB With provenance Details for django_chassis-1.0.24.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-chassis 1.0.24
File Interpreter ABI Platform Actions
django_chassis-1.0.24-py3-none-any.whl Python 3 none any Details for django_chassis-1.0.24-py3-none-any.whl

Total release size: 2.4 MB

Release files / django_chassis-1.0.24.tar.gz

Download URL django_chassis-1.0.24.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
2ec559b690d6698a3b7ad3f5262c2d642b122a21de96148bc5fd10c38d7145b9
BLAKE2b-256 checksum
How to use checksums
71e557ce0ef4c8deff7b62d72efaf5e0f6a0b7aa6b64e98d7a67270701bf0c9b
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 Nov 26, 2026.

Transparency log

Release files / django_chassis-1.0.24-py3-none-any.whl

Download URL django_chassis-1.0.24-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
29b9436cb317d0e85387a4fd462dfeb871a6e3d79788a8ec66fba4fafc48fe7b
BLAKE2b-256 checksum
How to use checksums
fbc3deef66f5724fc6c4cdcaaed9cd599f60c9040d851f7bd64d147259dff856
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 Nov 26, 2026.

Transparency log

Security for django-chassis 1.0.24

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_chassis-1.0.24.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 Nov 26, 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.

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