Skip to content

Instantly share code, notes, and snippets.

@rochacbruno
Created July 14, 2011 22:49
Show Gist options
  • Save rochacbruno/1083658 to your computer and use it in GitHub Desktop.
Save rochacbruno/1083658 to your computer and use it in GitHub Desktop.
web2py RSS template
def booksfeed():
r = dict()
r['title'] = "Books Feed"
r['link'] = "http://google.com"
r['description'] = "All My books"
r['entries'] = []
books = db().select(db.books.ALL)
for book in books:
r['entries'].append(dict(title=book.titulo, link="http://books/%s" % book.id, description=book.autor))
return r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment