Mercurial > hg > Feedworm
view backend/couchdb/Feed.py @ 136:7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Tue, 23 Aug 2011 04:15:46 +0200 |
parents | |
children | 2cd30af937fa |
line wrap: on
line source
class Feed(object): @staticmethod def all(database): viewResults = database.view("feedtest/feeds") return [Feed(row) for row in viewResults] def __init__(self, row): self.row = row def __getattr__(self, key): return self.row.value[key]