Mercurial > hg > Feedworm
comparison 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 |
comparison
equal
deleted
inserted
replaced
157:7dd9ae9556fd | 158:e8bb107a74e1 |
---|---|
14 ''' | 14 ''' |
15 | 15 |
16 def __init__(self): | 16 def __init__(self): |
17 server = couchdb.Server() | 17 server = couchdb.Server() |
18 self.database = server[DATABASE] | 18 self.database = server[DATABASE] |
19 self.prefs = None | |
19 | 20 |
20 def preferences(self): | 21 def preferences(self): |
21 return Preferences(self.database) | 22 if self.prefs is None: |
23 self.prefs = Preferences(self.database) | |
24 return self.prefs | |
22 | 25 |
23 # | 26 # |
24 # handling of feeds | 27 # handling of feeds |
25 # | 28 # |
26 | 29 |