diff backend/couchdb/CouchDbBackend.py @ 164:3eeda7cec39b

delete a feed via the GUI works now
author dirk
date Mon, 29 Aug 2011 03:32:39 +0200
parents ab2b26412b77
children 04c3b9796b89
line wrap: on
line diff
--- a/backend/couchdb/CouchDbBackend.py	Mon Aug 29 03:17:09 2011 +0200
+++ b/backend/couchdb/CouchDbBackend.py	Mon Aug 29 03:32:39 2011 +0200
@@ -74,8 +74,11 @@
             feed[key] = changes[key]
         feed.store(self.database)
 
-    def deleteFeed(self, feed):
-        raise Exception("not yet implemented")
+    def deleteSelectedFeed(self):
+        viewResults = self.database.view("feedtest/feedEntries_by_feed", key=self.selectedFeed.id)
+        for row in viewResults:
+            del self.database[row.id]
+        del self.database[self.selectedFeed.id]
 
     def entriesForFeed(self, feed, hideReadEntries):
         viewName = "feedtest/feedEntries_by_feed"