Mercurial > hg > Feedworm
diff backend/couchdb/CouchDbBackend.py @ 158:e8bb107a74e1
all preferences are stored in a single JSON document in the couchdb backend. PreferencesDialog converts QString to a proper Python datatybe before sending it to the backend.
author | dirk |
---|---|
date | Mon, 29 Aug 2011 02:33:51 +0200 |
parents | a05719a6175e |
children | 2940e74c9663 |
line wrap: on
line diff
--- a/backend/couchdb/CouchDbBackend.py Sat Aug 27 10:17:46 2011 +0200 +++ b/backend/couchdb/CouchDbBackend.py Mon Aug 29 02:33:51 2011 +0200 @@ -16,9 +16,12 @@ def __init__(self): server = couchdb.Server() self.database = server[DATABASE] + self.prefs = None def preferences(self): - return Preferences(self.database) + if self.prefs is None: + self.prefs = Preferences(self.database) + return self.prefs # # handling of feeds