Mercurial > hg > Feedworm
comparison 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 |
comparison
equal
deleted
inserted
replaced
135:b2ef673607e3 | 136:7217b060b39c |
---|---|
1 | |
2 class Feed(object): | |
3 @staticmethod | |
4 def all(database): | |
5 viewResults = database.view("feedtest/feeds") | |
6 return [Feed(row) for row in viewResults] | |
7 | |
8 def __init__(self, row): | |
9 self.row = row | |
10 | |
11 def __getattr__(self, key): | |
12 return self.row.value[key] |