From 0605eb498cffe3a0da56be22a31936fa59ff1516 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sun, 22 Nov 2015 15:11:16 +0100 Subject: Add authors to table --- watchnews/web.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'watchnews/web.py') 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"))), -- cgit v1.2.1