comparison backend/couchdb/CouchDbBackend.py @ 133:9e1e6b96d8b0

implement proxyHost/proxyPort in Preferences
author Dirk Olmes <dirk@xanthippe.ping.de>
date Tue, 23 Aug 2011 03:44:08 +0200
parents 63d6d60d37ff
children 2cd30af937fa
comparison
equal deleted inserted replaced
132:63d6d60d37ff 133:9e1e6b96d8b0
1 1
2 from Preferences import Preferences
2 import couchdb 3 import couchdb
4
5 DATABASE = "feedtest"
3 6
4 class CouchDbBackend(object): 7 class CouchDbBackend(object):
5 ''' 8 '''
6 Backend that uses CouchDB for persistence 9 Backend that uses CouchDB for persistence
7 ''' 10 '''
8 11
9 def __init__(self): 12 def __init__(self):
10 server = couchdb.Server() 13 server = couchdb.Server()
11 self.database = server["feedtest"] 14 self.database = server[DATABASE]
12 15
13 def preferences(self): 16 def preferences(self):
14 raise Exception("not yet implemented") 17 return Preferences(self.database)
15 18
16 def getFeeds(self): 19 def getFeeds(self):
17 raise Exception("not yet implemented") 20 raise Exception("not yet implemented")
18 21
19 def toggleRead(self, feedEntry): 22 def toggleRead(self, feedEntry):