Fix RSS links
This commit is contained in:
parent
0ef2280564
commit
167c84645b
1 changed files with 3 additions and 2 deletions
|
@ -346,11 +346,12 @@ def rss(token):
|
||||||
items = []
|
items = []
|
||||||
for row in Comment.select().join(Site).where(
|
for row in Comment.select().join(Site).where(
|
||||||
Site.token == token, Comment.published).order_by(-Comment.published).limit(10):
|
Site.token == token, Comment.published).order_by(-Comment.published).limit(10):
|
||||||
|
item_link = "http://%s%s" % (site.url, row.url)
|
||||||
items.append(PyRSS2Gen.RSSItem(
|
items.append(PyRSS2Gen.RSSItem(
|
||||||
title='%s - http://%s%s' % (row.author_name, site.url, row.url),
|
title='%s - http://%s%s' % (row.author_name, site.url, row.url),
|
||||||
link="http://%s%s" % (site.url, row.url),
|
link= item_link,
|
||||||
description=md.convert(row.content),
|
description=md.convert(row.content),
|
||||||
guid=PyRSS2Gen.Guid('%s%d' % (token, row.id)),
|
guid=PyRSS2Gen.Guid(item_link),
|
||||||
pubDate=row.published
|
pubDate=row.published
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue