comparison backend/couchdb/FeedEntry.py @ 144:74217db92993

updating feeds on the couchdb backend works now
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 24 Aug 2011 11:54:06 +0200
parents
children b290e29a94b5
comparison
equal deleted inserted replaced
143:f0941f42314c 144:74217db92993
1
2 class FeedEntry(object):
3 @staticmethod
4 def findByLink(link, database):
5 viewResults = database.view("feedtest/feedEntry_by_link")
6 resultsForKey = viewResults[link]
7 try:
8 row = iter(resultsForKey).next()
9 return FeedEntry(row)
10 except StopIteration:
11 return None
12
13 def __init__(self, row):
14 self.row = row
15
16 def __getattr__(self, key):
17 return self.row.value[key]
18