blog_feed

This commit is contained in:
Rushabh Mehta 2013-03-15 11:36:43 +05:30
parent 37db223329
commit c08e1037d6

View File

@ -44,7 +44,7 @@ rss_item = u"""
<description>%(content)s</description>
<link>%(link)s</link>
<guid>%(name)s</guid>
<pubDate>%(creation)s</pubDate>
<pubDate>%(published_on)s</pubDate>
</item>"""
def generate():
@ -57,9 +57,9 @@ def generate():
items = ''
blog_list = webnotes.conn.sql("""\
select page_name as name, modified, creation, title, content from `tabBlog Post`
select page_name as name, published_on, modified, title, content from `tabBlog Post`
where ifnull(published,0)=1
order by creation desc, modified desc, name asc limit 20""", as_dict=1)
order by published_on desc limit 20""", as_dict=1)
for blog in blog_list:
blog.link = host + '/' + blog.name + '.html'