From c6a045730ca0cf1ee484110a0dcc34173ce97690 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 28 Oct 2013 00:50:35 +0100 Subject: Mention news article authors Mention the names of news articles authors, as we did on the old web site. --- web/macros.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'web/macros.py') diff --git a/web/macros.py b/web/macros.py index 309e0b4..05dcf5a 100644 --- a/web/macros.py +++ b/web/macros.py @@ -107,14 +107,15 @@ def make_news_page(posts, current_index): teaser = ['# ' + title] for p in posts: source = list() + author = p.author.encode('ascii', 'xmlcharrefreplace') timestamp = time.strptime(p.date, '%Y-%m-%d') - date = time.strftime('%A, %B %-e, %Y', timestamp) + author_date = author + ', ' + time.strftime('%B %-e, %Y', timestamp) teaser.append('## %s' % p.title) - teaser.append('*%s*' % date) + teaser.append('*%s*' % author_date) teaser.append('%s' % p.source.split(marker, 1)[0].rstrip()) teaser.append('Read more »' % p.url) source.append('# %s' % p.title) - source.append('*%s*' % date) + source.append('*%s*' % author_date) source.append(p.source.replace(marker, '', 1)) p.source = '\n'.join(source) p['parent'] = title -- cgit v1.2.3-74-g34f1