From 265c88abca7555d2bdf8cc910ce9dd7cc0aef56e Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Mon, 29 Aug 2016 17:00:11 +0200 Subject: [PATCH] Fix #79 --- README.creole | 2 ++ reversion_compare/__init__.py | 2 +- reversion_compare/admin.py | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.creole b/README.creole index d88cde0..d7a6676 100644 --- a/README.creole +++ b/README.creole @@ -233,6 +233,8 @@ Maybe other versions are compatible, too. == Changelog == +* [[https://github.com/jedie/django-reversion-compare/compare/v0.7.0...v0.7.1|v0.7.1 - 29.08.2016]]: +** [[https://github.com/jedie/django-reversion-compare/issues/79|Fix #79: missing import if **ADD_REVERSION_ADMIN != True**]] * [[https://github.com/jedie/django-reversion-compare/compare/v0.6.3...v0.7.0|v0.7.0 - 25.08.2016]]: ** [[https://github.com/jedie/django-reversion-compare/pull/76|support only django-reversion >= 2.0]] based on a contribution by [[https://github.com/jedie/django-reversion-compare/pull/73|mshannon1123]] ** remove internal **reversion_api** diff --git a/reversion_compare/__init__.py b/reversion_compare/__init__.py index 91eadea..1d2443f 100644 --- a/reversion_compare/__init__.py +++ b/reversion_compare/__init__.py @@ -1,3 +1,3 @@ # coding: utf-8 -__version__ = "0.7.0" +__version__ = "0.7.1" diff --git a/reversion_compare/admin.py b/reversion_compare/admin.py index f3c60ea..b2a49b4 100644 --- a/reversion_compare/admin.py +++ b/reversion_compare/admin.py @@ -29,6 +29,7 @@ from django.utils.translation import ugettext as _ from reversion.admin import VersionAdmin +from reversion.models import Revision, Version from reversion_compare.forms import SelectDiffForm from reversion_compare.mixins import CompareMixin, CompareMethodsMixin @@ -216,12 +217,10 @@ class CompareVersionAdmin(CompareMethodsMixin, BaseCompareVersionAdmin): expand the base class with prepared compare methods. This is the class to inherit """ + pass if hasattr(settings, "ADD_REVERSION_ADMIN") and settings.ADD_REVERSION_ADMIN: - from reversion.models import Revision, Version - - class RevisionAdmin(admin.ModelAdmin): list_display = ("id", "date_created", "user", "comment") list_display_links = ("date_created",)