Mercurial > hg > Feedworm
comparison backend/couchdb/CouchDbBackend.py @ 148:c5a427d46703
displaying entries for a feed works now with the couchdb backend
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Fri, 26 Aug 2011 06:13:39 +0200 |
parents | 8ec20377bcb0 |
children | a05719a6175e |
comparison
equal
deleted
inserted
replaced
147:b290e29a94b5 | 148:c5a427d46703 |
---|---|
22 | 22 |
23 def getFeeds(self): | 23 def getFeeds(self): |
24 if self.preferences().showOnlyUnreadFeeds(): | 24 if self.preferences().showOnlyUnreadFeeds(): |
25 return self._getUnreadFeeds() | 25 return self._getUnreadFeeds() |
26 else: | 26 else: |
27 return Feed.all(self.database) | 27 # make sure that the results are actually fetched into memory, otherwise we'll pass |
28 # a ViewResults instance around which is not what we want | |
29 return list(Feed.all(self.database)) | |
28 | 30 |
29 def _getUnreadFeeds(self): | 31 def _getUnreadFeeds(self): |
30 raise Exception("not yet implemented") | 32 raise Exception("not yet implemented") |
31 | 33 |
32 def toggleRead(self, feedEntry): | 34 def toggleRead(self, feedEntry): |
46 | 48 |
47 def entriesForFeed(self, feed, hideReadEntries): | 49 def entriesForFeed(self, feed, hideReadEntries): |
48 viewName = "feedtest/feedEntries_by_feed" | 50 viewName = "feedtest/feedEntries_by_feed" |
49 if hideReadEntries: | 51 if hideReadEntries: |
50 viewName = "feedtest/unread_feedEntries_by_feed" | 52 viewName = "feedtest/unread_feedEntries_by_feed" |
51 viewResults = self.database.view(viewName) | 53 return list(FeedEntry.view(self.database, viewName)) |
52 return [FeedEntry(row) for row in viewResults] | |
53 | 54 |
54 def markFeedEntriesAsRead(self, entries): | 55 def markFeedEntriesAsRead(self, entries): |
55 raise Exception("not yet implemented") | 56 raise Exception("not yet implemented") |
56 | 57 |
57 def updateAllFeeds(self): | 58 def updateAllFeeds(self): |