Django Utils¶
Django Utils is a collection of the small Django helpers, admin power-ups and ORM utilities that most projects end up writing themselves: JSON-aware admin filters, encrypted model fields, memory-bounded queryset iteration, resumable management commands, and more. It is by no means a complete collection, but it has served production projects well and keeps growing.
Filters (including JSON sub-path and operator filters), the validating JSON widget, read-only admin, sortable count columns, and CSV/JSON export.
Slug/__str__ mixins, metadata-carrying choices, Fernet-encrypted fields,
and a native PostgreSQL enum field.
Memory-bounded queryset_iterator, fan-out-safe subquery aggregates, and
chunked upsert via bulk_update_or_create.
ChunkedCommand: resumable, checkpointed processing of large querysets
with progress logging and a transactional dry-run.
ASGI-safe request/user context, Fetch-Metadata CSRF hardening, auth decorators, and production-safe query budgets.
What it does differently from django-extensions and django-model-utils, and the quality gates every release has to pass.
Quickstart¶
pip install django-utils2
INSTALLED_APPS = [
...,
'django_utils',
]
The quickstart walks through the first three features worth enabling.