Created
July 14, 2011 22:49
-
-
Save rochacbruno/1083658 to your computer and use it in GitHub Desktop.
web2py RSS template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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