Settings and checks
Django settings
| Setting | Default | Purpose |
|---|---|---|
CHASSIS_USERS_MODULE_ENABLED | True | Globally enable the built-in users runtime |
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' |
CHASSIS_WORKER_PROVIDER | 'auto' | Select a provider by name, 'auto', or 'none' Added in 1.0.19 |
CHASSIS_WORKER_PROVIDERS | Dramatiq, Celery | Ordered provider class paths Added in 1.0.19 |
CELERY_BROKER_URL | none | Celery provider detects the project integration |
DRAMATIQ_BROKER | none | Dramatiq provider detects the project integration Added in 1.0.19 |
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.
Added in 1.0.7Set CHASSIS_USERS_MODULE_ENABLED = False when the application keeps its own
user profiles, Admin sessions, login protection, and audit journal. This is a
global opt-out; the per-site include_users_module flag cannot override it.
Admin error-page fallback
Changed in 1.0.3When the full AdminSite.each_context() is unavailable, the safe HTML
error-page fallback independently calls get_chassis_footer_context() and
preserves its developer, product, and version details. An AdminSite without
that hook, or an exception raised by the hook, produces an empty footer context
without preventing the error page from rendering.
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.1 Changed in 1.0.20Chassis ships manage.py run_gunicorn. It starts the project WSGI app with
sync workers:
pip install 'django-chassis[gunicorn]'
uv run python manage.py run_gunicorn --port=8000 --workers=2
Gunicorn is an optional extra for WSGI projects. ASGI deployments can use run_uvicorn with the [uvicorn] extra. Importing the command does not load Gunicorn.
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.
Uvicorn
Added in 1.0.20pip install 'django-chassis[uvicorn]'
uv run python manage.py run_uvicorn --host 0.0.0.0 --port 8000 --workers 2
uv run python manage.py run_uvicorn --workers 1 --reload
The command resolves --app or Django ASGI_APPLICATION. Both
project.asgi.application and project.asgi:application are accepted. Command
discovery and --help work without Uvicorn installed; execution explains the
required extra. Unrelated missing imports keep their original error.
| Option | Default | Environment override |
|---|---|---|
--host | 0.0.0.0 | — |
--port, -p | 8000 | PORT |
--workers, -w | 2 | UVICORN_WORKERS |
--log-level, -l | info | — |
--timeout | 30 seconds, graceful shutdown | — |
--timeout-keep-alive | 5 seconds | — |
--ws-max-size | 16777216 bytes | UVICORN_WS_MAX_SIZE |
--ws-max-queue | 32 frames | UVICORN_WS_MAX_QUEUE |
--reload requires one worker. Ports must be 1–65535; workers, timeouts and
WebSocket limits must be positive. Explicit CLI arguments override environment
variables. Invalid unused environment defaults do not break --help.
CHASSIS_UVICORN_WS_MAX_SIZE and CHASSIS_UVICORN_WS_MAX_QUEUE optionally set the
project's WebSocket transport defaults. CLI arguments and environment variables
take precedence over these settings; otherwise the standard defaults above apply.
These limits bound Uvicorn's transport. Application protocol/authorization limits
remain the project's responsibility. See Uvicorn settings.
Optional extra
pip install 'django-chassis[celery]'
pip install 'django-chassis[dramatiq]'
Worker selection applies to every Chassis task. See Background tasks
for registration and additional providers, and Import/export backends
for the single WORKER form choice.