Settings and checks
Django settings
| Setting | Default | Purpose |
|---|---|---|
CHASSIS_PERMISSION_CHECK | 'group_only' | group_only or user_has_perm |
CHASSIS_PERMISSION_NAME_NORMALIZATION_ENABLED | False | Normalize stock Django permission display names after migrate |
CHASSIS_PERMISSION_NAME_NORMALIZATION_LANGUAGE | required when enabled | Currently 'ru' |
CELERY_BROKER_URL | none | Celery backend is offered only when Celery is installed and this is set |
STORAGES['media'] | project storage | Import/export file storage |
CHASSIS_LOGIN_ATTEMPT_LIMITS_ENABLED | True | Apply login-attempt schedule delays |
CHASSIS_ADMIN_PATH_PREFIX | '/admin/' | Prefix watched by session and audit middleware |
GEOIP_COUNTRY_DATABASE_PATH | unset | GeoLite2 Country MMDB for session/profile country |
Optional middleware for Chassis HTML error pages, admin sessions, and the Admin journal:
MIDDLEWARE = [
# ...
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_chassis.middlewares.UserSessionMiddleware',
'django_chassis.middlewares.AdminAuditMiddleware',
'django_chassis.middlewares.AdminErrorPageMiddleware',
]
See Users and access for GeoIP and login-attempt settings.
There is no large Chassis settings block. Site and ModelAdmin behaviour is declared in Python on the mixins.
System checks
ChassisAdminMixin and ChassisAdminSiteMixin register Django system checks for:
- action permission references
- export field / filter lookups
- sidebar model and page references
- dashboard layout (duplicate slugs, chart cardinality, global alerts)
Run them with the rest of Django's checks:
uv run python manage.py check
Construction-time errors (ImproperlyConfigured) fire when the AdminSite
is instantiated: invalid page access contracts, missing view_* permissions
on PermissionAdminPage, personal pages in navbar groups.
Supported runtime
Changed in 1.0.1- Python 3.13, 3.14
- Django 6.0+
Gunicorn
Added in 1.0.1Chassis ships manage.py run_gunicorn. It starts the project WSGI app with
sync workers:
uv run python manage.py run_gunicorn --port=8000 --workers=2
The WSGI target comes from --app or Django WSGI_APPLICATION
(project.wsgi.application becomes project.wsgi:application). Optional
--config points at a Gunicorn Python config.
Optional extra
pip install 'django-chassis[celery]'
See Import and export backends. GeoIP
(geoip2) is a required dependency; country lookup still needs
GEOIP_COUNTRY_DATABASE_PATH. See Users and access.