skillfed

django-reversion

An extension to the Django web framework that provides version control for model instances.

django-reversion v6.3.0 1.9M downloads/30d#3,486 on PyPI3,169
Permissive license BSD Active released

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-reversion

uv

uv add django-reversion

poetry

poetry add django-reversion

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

django model version controldjango audit traildjango undo changesdjango recover deleted recordsdjango history trackingdjango revert changesdjango model history
django-extensionaudit-traildata-recovery

More Database packages