any rss feed lib for gae..
- by zjm1126
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 ?