skillfed

django-reversion-compare

Add compare view to django-reversion for comparing two versions of a reversion model.

django-reversion-compare v0.20.0 87.6K downloads/30d#13,781 on PyPI321
Copyleft license GPL-3.0-or-later Active released

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

uv

uv add django-reversion-compare

poetry

poetry add django-reversion-compare

Installing 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

django model version comparisondjango admin revision diffdjango-reversion compare historytrack model changes djangoversion control django modelsdjango admin change historymodel field change tracking
django-adminversion-controlaudit-trail

More Dynamic Content packages