django-reversion
An extension to the Django web framework that provides version control for model instances.
What it is and what it does
django-reversion is a Django extension that automatically tracks changes to model instances, storing a complete history of each record's state over time. It lets you roll back any model instance to a previous version, recover deleted records from the revision history, and integrates with Django's admin interface to expose these capabilities to administrators.
The package works by intercepting model saves and deletions, storing snapshots of model state in the database. You wrap model operations in a revision context to group related changes together, making it easy to undo or audit modifications. It's designed for Django applications that need audit trails, undo functionality, or recovery from accidental deletions.
Use it for:
- Implement an undo/redo feature in a Django admin interface for content management systems.
- Maintain an audit trail of all changes to critical business records for compliance or investigation.
- Recover accidentally deleted records from the revision history without manual database restoration.
- Track who changed what and when for user-facing activity logs or administrative reports.
- Support rollback of bulk data imports or migrations that introduced errors.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
django-reversion adds version control to Django model instances, allowing you to roll back changes, recover deleted records, and track history through a simple admin interface.
Yes. django-reversion is actively maintained, has no known vulnerabilities, carries a permissive BSD license, and solves a common Django problem with low install friction. It's well-established (first released in 2012) and widely used. Install it if you need model versioning, audit trails, or recovery capabilities in a Django project.
Install
django-reversion on PyPI
pip
pip install django-reversionuv
uv add django-reversionpoetry
poetry add django-reversionInstalling django-reversion
Before you install
Low friction install with a single runtime dependency on django. The project is actively maintained with a recent release and steady commit activity, indicating reliable ongoing support.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install django-reversion
import reversion
from django.db import models
with reversion.create_revision():
instance.field = 'new_value'
instance.save()
Requires Django 4.2 or later and Python 3.9 or later.
Verify before relying
- Whether the admin integration requires additional configuration beyond basic installation.
- Performance characteristics when tracking large numbers of revisions on high-traffic models.
- Database storage overhead for revision history in production environments.
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — django |
| Maintenance | actively maintained — 63 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,857,458/month — #3,486 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_reversion-6.3.0-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
django-cloneDuplicates Django model instances with…
permissive · top 15,000 on PyPI
django-auditlogdjango-auditlog logs changes to Django model…
permissive · top 5,000 on PyPI
django-pghistoryTracks all changes to Django models using…
permissive · top 15,000 on PyPI
django-dirtyfieldsTracks which fields on a Django model instance…
permissive · top 15,000 on PyPI
django-safedeleteProvides soft-delete functionality for Django…
permissive · top 5,000 on PyPI
SQLAlchemy-ContinuumSQLAlchemy-Continuum adds automatic versioning…
permissive · top 5,000 on PyPI
django-fsm-logAutomatically logs state transitions for Django…
permissive · top 15,000 on PyPI