--- id: django-model-utils version: "5.0.0" license: BSD license_treatment: permissive maintenance: active --- # django-model-utils — Django model mixins and utilities License: permissive · Maintenance: active · Downloads: 4.9M/mo ## What it is and what it does django-model-utils is a collection of reusable model mixins and field types that extend Django's built-in model capabilities. It provides utilities like TimeStampedModel (automatically adds created/modified timestamps), SoftDeletableModel (logical deletion without removing data), FieldTracker (monitors field changes), and StatusField (manages state transitions). It also includes managers for model inheritance queries and utilities for working with choices and UUID fields. The library is designed to reduce boilerplate in common Django patterns. Rather than reimplementing field tracking or soft-delete logic in every project, developers import the relevant mixin or field type into their models. It has minimal dependencies—only Django itself—and integrates directly into Django's ORM, so queries and migrations work as expected. The package is actively maintained, supports current Django and Python versions, and carries no known security vulnerabilities. Use it for: - Add automatic created/modified timestamps to models without writing custom save() logic. - Implement soft-delete functionality where records are marked deleted but retained in database. - Track which fields on a model instance have changed since it was loaded or last saved. - Define status or state fields with predefined choices and automatic change-date tracking. - Query model inheritance hierarchies efficiently without N+1 queries. - Generate URL-safe tokens for password resets or one-time links. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides reusable model mixins and field utilities for Django applications, including soft-delete models, field tracking, status management, and inheritance helpers. Yes. django-model-utils is a well-maintained, widely-used library that solves genuine repetitive problems in Django development. It has low install friction, no security vulnerabilities, a permissive license, and active support for current Django and Python versions. Install it if your project uses Django and you need any of its utilities—field tracking, soft deletes, timestamped models, or status management. ## Install pip install django-model-utils uv add django-model-utils poetry add django-model-utils ## Installing django-model-utils Before you install: Low friction install with a single dependency on Django. Actively maintained with recent releases and commits, supporting Django 3.2 through 5.1 and Python 3.8 through 3.12. License in practice: BSD permissive license allows use in commercial and open-source projects with minimal restrictions; attribution required. Quickstart: pip install django-model-utils from django_model_utils.models import TimeStampedModel from django_model_utils.fields import StatusField class Article(TimeStampedModel): status = StatusField() Requires Django 3.2 or later and Python 3.8 or later. Verify before relying: - Specific performance characteristics of FieldTracker on large datasets or complex model hierarchies. - Compatibility edge cases with Django async ORM features in Django 4.1+. ## Package facts - License: BSD (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 4.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags django model mixins, field tracking django, soft delete models, django utilities, status field django, model inheritance django, timestamped models, django-orm, model-utilities, soft-delete [View on SkillFed](https://skillfed.io/packages/django-model-utils) · [View on PyPI](https://pypi.org/project/django-model-utils/)