[Feed] update & cleanup feed generator

This commit is contained in:
tmshv committed 2017-04-22 20:12:14 +03:00
1 parent 4f373e9e00
commit 331b326f87
1 file changed
+3 -7
+3 -7
View File
@@ -18,14 +18,12 @@ def get_feed():
articles = sorted(events + news, key=lambda item: item['date'], reverse=True)
fg = FeedGenerator()
fg.id('1')
fg.id('art.shlisselburg.org')
fg.title('Шлиссельбургская ДХШ')
# fg.author({'name': 'John Doe', 'email': 'john@example.de'})
fg.link(href='https://art.shlisselburg.org', rel='alternate')
# fg.logo('http://ex.com/logo.jpg')
# fg.subtitle('События ')
fg.logo('https://static.shlisselburg.org/art/graphics/favicon-144.png')
fg.link(href='https://art.shlisselburg.org/feed', rel='self')
fg.language('en')
fg.language('ru')
for article in articles:
content = html.unescape(article['post'])
@@ -38,6 +36,4 @@ def get_feed():
fe.content(content, None, 'CDATA')
fe.link({'href': url})
# return articles
return fg.atom_str(pretty=True)
# return fg.atom_str()