summaryrefslogtreecommitdiff
path: root/watchnews/web.py
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2015-11-22 15:11:16 +0100
committerYves Fischer <yvesf-git@xapek.org>2015-11-22 15:11:16 +0100
commit0605eb498cffe3a0da56be22a31936fa59ff1516 (patch)
tree4ced88d4584ada7d31c4204b8600cb2523484643 /watchnews/web.py
parentd2794bf7560db5784c8eeda31bf574c7526de88b (diff)
downloadwatchnews-0605eb498cffe3a0da56be22a31936fa59ff1516.tar.gz
watchnews-0605eb498cffe3a0da56be22a31936fa59ff1516.zip
Add authors to table
Diffstat (limited to 'watchnews/web.py')
-rw-r--r--watchnews/web.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/watchnews/web.py b/watchnews/web.py
index 09fb042..ba43970 100644
--- a/watchnews/web.py
+++ b/watchnews/web.py
@@ -78,6 +78,7 @@ class Difftable(html.div, DiffSupport):
def single_version(self, version):
self.append(html.table(
html.tr(html.th("Title"), html.td(version.title)),
+ html.tr(html.th("Authors"), html.td(version.authors)),
html.tr(html.th("Date"), html.td(
version.created_date.strftime("%x %X"))),
html.tr(html.th("Link"), html.td(
@@ -95,11 +96,17 @@ class Difftable(html.div, DiffSupport):
from_difftitle, to_difftitle = self._diff(
from_version.title, to_version.title)
+ from_authors, to_authors = self._diff(
+ from_version.authors, to_version.authors)
+
diff = difflib._mdiff(from_text, to_text)
self.append(html.div(html.table(
html.tr(html.th("Title"),
html.td(from_difftitle),
html.td(to_difftitle), **{'class': 'textdiff'}),
+ html.tr(html.th("Authors"),
+ html.td(from_authors),
+ html.td(to_authors), **{'class': 'textdiff'}),
html.tr(html.th("Date"),
html.td(from_version.created_date.strftime("%x %X")),
html.td(to_version.created_date.strftime("%x %X"))),