any rss feed lib for gae..
Posted
by zjm1126
on Stack Overflow
See other posts from Stack Overflow
or by zjm1126
Published on 2010-05-17T10:47:50Z
Indexed on
2010/05/17
10:50 UTC
Read the original article
Hit count: 278
i want enable rss for gae on my site .
and did you know the simple way to do this ?
thanks
this is a example i searched:
class FeedHandler(BaseRequestHandler):
def get(self,tags=None):
blogs = Weblog.all().filter('entrytype =','post').order('-date').fetch(10)
last_updated = datetime.datetime.now()
if blogs and blogs[0]:
last_updated = blogs[0].date
last_updated = last_updated.strftime("%Y-%m-%dT%H:%M:%SZ")
for blog in blogs:
blog.formatted_date = blog.date.strftime("%Y-%m-%dT%H:%M:%SZ")
self.response.headers['Content-Type'] = 'application/atom+xml'
self.generate('atom.xml',{'blogs':blogs,'last_updated':last_updated})
any more simple ?
© Stack Overflow or respective owner