GetVersionMixin not required. Fixed htmldiff function.

This commit is contained in:
Emanuel Schuetze 2013-03-14 23:26:41 +01:00
parent 3f4df58807
commit 2a2c704bf2
3 changed files with 4 additions and 5 deletions

View File

@ -15,8 +15,6 @@
from datetime import datetime
import difflib
from django.core.urlresolvers import reverse
from django.db import models, IntegrityError
from django.db.models import Max

View File

@ -251,7 +251,7 @@ class VersionRejectView(GetVersionMixin, SingleObjectMixin, QuestionMixin, Redir
version_reject = VersionRejectView.as_view()
class VersionDiffView(GetVersionMixin, DetailView):
class VersionDiffView(DetailView):
"""Show diff between two versions of a motion."""
permission_required = 'motion.can_see_motion'
model = Motion

View File

@ -10,8 +10,9 @@
:license: GNU GPL, see LICENSE for more details.
"""
import sys
import difflib
import json
import sys
from django.contrib import messages
from django.contrib.auth.models import Permission
@ -156,7 +157,7 @@ def html_strong(string):
return u"<strong>%s</strong>" % string
def htmldiff(self, rev1, rev2):
def htmldiff(rev1, rev2):
"""Return string of html diff between two strings (rev1 and rev2)"""
diff = difflib.HtmlDiff(wrapcolumn=60)