diff backend/couchdb/FeedEntry.py @ 155:a05719a6175e

move common functionality into an abstract backend class, have both backends inherit from it. Implement enough of the couchdb backend that reading feeds (and marking feed entries as read) is possible
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sat, 27 Aug 2011 08:52:03 +0200
parents b290e29a94b5
children e284a37df1d9
line wrap: on
line diff
--- a/backend/couchdb/FeedEntry.py	Sat Aug 27 07:32:01 2011 +0200
+++ b/backend/couchdb/FeedEntry.py	Sat Aug 27 08:52:03 2011 +0200
@@ -22,3 +22,14 @@
 #            return None
         return None
 
+    def markRead(self, database):
+        self.read = True
+        self.store(database)
+
+    def toggleRead(self, database):
+        if self.read:
+            self.read = False
+        else:
+            self.read = True
+        self.store(database)
+