diff backend/couchdb/Preferences.py @ 169:91a24f499318

introdue an abstraction for the name of the database so it can be changed via commandline parameter
author dirk
date Fri, 09 Sep 2011 14:52:54 +0200
parents e8bb107a74e1
children 214addba1f93
line wrap: on
line diff
--- a/backend/couchdb/Preferences.py	Mon Sep 05 19:43:34 2011 +0200
+++ b/backend/couchdb/Preferences.py	Fri Sep 09 14:52:54 2011 +0200
@@ -1,3 +1,5 @@
+
+import CouchDb
 
 DAYS_TO_KEEP_FEED_ENTRIES = "daysToKeepFeedEntries"
 HIDE_READ_FEED_ENTRIES = "hideReadFeedEntries"
@@ -13,7 +15,7 @@
         self.documentIsDirty = False
 
     def _initDocument(self):
-        viewResults = self.database.view("feedtest/preference")
+        viewResults = self.database.view(CouchDb.preference())
         try:
             row = iter(viewResults).next()
             self.document = self.database[row.id]