По просьбе трудящихся сделал RSS
@route('/rss')
def rss():
# Текущее время
dtime = time.strftime("%a, %d %b %Y %H:%M:%S +0500", time.gmtime())
res = []
db = models.ldb() # Подключение к БД
cur = db.dbCursor()
# делаем выборку
cur.execute('SELECT id,summary,content,dtime FROM pages ORDER BY dtime1 DESC LIMIT 15')
for r in cur:
res.append( {'id':r[0],'summary':r[1],'content':r[2],'dtime':time.strftime('%a, %d %b %Y %H:%M:%S GMT',time.localtime(r[3])) } )
return template('rss',dtime=dtime,res=res)
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>myBoard</title>
<link>http://example.com</link>
<description>Описание сайта</description>
<lastBuildDate>{{dtime}}</lastBuildDate>
<webMaster>[email protected]</webMaster>
{% for d in res %}
<item>
<title>{{d['summary']}}</title>
<link>http://example.com/page/{{d['id']}}</link>
<description><![CDATA[ {{d['content']}} ]]></description>
<pubDate>{{d['dtime']}}</pubDate>
</item>
{% endfor %}
</channel>
</rss>
...
<head>
<link rel="alternate" href="http://example.com/rss"
type="application/rss+xml" title="RSS">
...