|
|
@ -34,11 +34,20 @@ class Rss:
|
|
|
|
.order_by(-Comment.published)
|
|
|
|
.order_by(-Comment.published)
|
|
|
|
.limit(10)
|
|
|
|
.limit(10)
|
|
|
|
):
|
|
|
|
):
|
|
|
|
item_link = "%s://%s%s" % (self._rss_proto, self._site_url, row.url)
|
|
|
|
item_link = "%s://%s%s" % (
|
|
|
|
|
|
|
|
self._rss_proto,
|
|
|
|
|
|
|
|
self._site_url,
|
|
|
|
|
|
|
|
row.url,
|
|
|
|
|
|
|
|
)
|
|
|
|
items.append(
|
|
|
|
items.append(
|
|
|
|
PyRSS2Gen.RSSItem(
|
|
|
|
PyRSS2Gen.RSSItem(
|
|
|
|
title="%s - %s://%s%s"
|
|
|
|
title="%s - %s://%s%s"
|
|
|
|
% (self._rss_proto, row.author_name, self._site_url, row.url),
|
|
|
|
% (
|
|
|
|
|
|
|
|
self._rss_proto,
|
|
|
|
|
|
|
|
row.author_name,
|
|
|
|
|
|
|
|
self._site_url,
|
|
|
|
|
|
|
|
row.url,
|
|
|
|
|
|
|
|
),
|
|
|
|
link=item_link,
|
|
|
|
link=item_link,
|
|
|
|
description=md.convert(row.content),
|
|
|
|
description=md.convert(row.content),
|
|
|
|
guid=PyRSS2Gen.Guid("%s/%d" % (item_link, row.id)),
|
|
|
|
guid=PyRSS2Gen.Guid("%s/%d" % (item_link, row.id)),
|
|
|
|