django-reversion-compare is a Django app, an extension to django-reversion that provides a history compare view to compare two versions of a model which is under reversion.
Comparing model versions is not a easy task. Maybe there are different view how this should looks like. This project will gives you a generic way to see whats has been changed.
Many parts are customizable by overwrite methods or subclassing, see above.
Installation
Just use:
pip install django-reversion-compare
Setup
Add **reversion_compare** to **INSTALLED_APPS** in your settings.py, e.g.:
INSTALLED_APPS = (
'django...',
...
'reversion', # https://github.com/etianen/django-reversion
'reversion_compare', # https://github.com/jedie/django-reversion-compare
...
)
Usage
Inherit from **CompareVersionAdmin** instead of **VersionAdmin** to get the compare feature.
admin.py e.g.:
::
from django.contrib import admin
from reversion_compare.admin import CompareVersionAdmin
from my_app.models import ExampleModel
class ExampleModelAdmin(CompareVersionAdmin):
pass
admin.site.register(ExampleModel, ExampleModelAdmin)
What is new in this release:
- Use VersionAdmin.revision_manager rather than default_revision_manager, contributed by Mark Lavin - see: pull request 7
- Use logging for all debug prints, contributed by Bojan Mihelac - see: pull request 8
What is new in version 0.3.2.0604:
- Bugfix for Python 2.6 in unified_diff(), see: AttributeError: 'module' object has no attribute '_format_range_unified'
What is new in version 0.3.1.0601:
- Bugfix: force unicode in html diff
- Bugfix in unittests
What is new in version 0.3.0 Beta 0516:
- Enhanced handling of m2m changes with follow and non-follow relations.
What is new in version 0.2.1 Beta 0510:
- Bugfix for models which has no m2m field: https://github.com/jedie/django-reversion-compare/commit/c8e042945a6e78e5540b6ae27666f9b0cfc94880
What is new in version 0.2.0 Beta 0509:
- Many-to-many compare works, too.
Requirements:
- Python
- Django
Comments not found