django-reversion-compare
Add compare view to django-reversion for comparing two versions of a reversion model.
What it is and what it does
django-reversion-compare extends django-reversion to display a visual diff when comparing two versions of a model. It provides both an admin interface enhancement (via CompareVersionAdmin) and a standalone class-based view for showing what changed between revisions. The package renders field-by-field comparisons with support for text diffs, foreign keys, and many-to-many relationships, and allows customization by overriding comparison methods per field or field type.
The package depends on django-reversion for underlying revision tracking, diff-match-patch for computing text diffs, rich for output formatting, and Django itself. It is actively maintained and compatible with recent Django and Python versions. The GPL-3.0-or-later license means it is suitable only for open-source projects or those willing to license their code under GPL.
Use it for:
- Display a detailed audit trail in Django admin showing exactly which fields changed between model revisions.
- Build a custom history page showing what was modified in a document or record over time.
- Compare two specific versions of a model to understand the sequence of edits.
- Customize diff rendering for domain-specific fields by overriding comparison methods.
- Add version comparison to third-party Django models without modifying their source code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds a side-by-side version comparison view to Django admin for models tracked by django-reversion, showing field-by-field diffs between revisions.
Yes, if your project is open-source or GPL-compatible and you need to show model change history to users. The package is actively maintained, has low install friction, and solves a real problem for Django projects using django-reversion. Not suitable for proprietary applications without a commercial license agreement.
Install
django-reversion-compare on PyPI
pip
pip install django-reversion-compareuv
uv add django-reversion-comparepoetry
poetry add django-reversion-compareInstalling django-reversion-compare
Before you install
Low friction install with four runtime dependencies. Active maintenance with last commit 2026-08-10. Requires Python >=3.12.
License in practice
GPL-3.0-or-later copyleft license. Using this package requires you to license derivative works under GPL-3.0 or a compatible open-source license; proprietary applications cannot use it without obtaining an alternative license.
Quickstart
pip install django-reversion-compare
# In settings.py INSTALLED_APPS:
INSTALLED_APPS = [
'reversion',
'reversion_compare',
]
# In admin.py:
from reversion_compare.admin import CompareVersionAdmin
from django.contrib import admin
class MyModelAdmin(CompareVersionAdmin):
pass
Requires django-reversion to be installed and configured first; django-reversion itself requires a database backend and Django admin setup.
Verify before relying
- Whether the package supports all field types in modern Django versions or has known gaps in comparison rendering.
- Performance characteristics when comparing models with large text fields or many-to-many relationships.
- Whether customization via method overrides works reliably across Django version upgrades.
Package facts
| License | GPL-3.0-or-later (copyleft) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — diff-match-patch, django, django-reversion, rich |
| Maintenance | actively maintained — 11 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 87,626/month — #13,781 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_reversion_compare-0.20.0-py3-none-any.whl
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
django-reversiondjango-reversion adds version control to Django…
permissive · top 5,000 on PyPI
django-reverse-adminAdds reverse inline support to Django admin for…
permissive · top 15,000 on PyPI
django-linear-migrationsEnforces linear migration history in Django…
permissive · top 5,000 on PyPI
django-admin-sortable2Adds drag-and-drop reordering of model…
permissive · top 5,000 on PyPI
django-adminplusAdds custom admin views to Django's admin…
permissive · top 5,000 on PyPI
django-admin-extra-buttonsAdds custom buttons, links, and views to Django…
permissive · top 15,000 on PyPI
django-ajax-selectsAdds autocomplete search fields to Django Admin…
permissive · top 15,000 on PyPI