GetVersionMixin not required. Fixed htmldiff function.
This commit is contained in:
parent
3f4df58807
commit
2a2c704bf2
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user