def set_up(self, settings, storage_name): BaseNosqlSession.set_up(self, settings, storage_name) server = couchdb.Server(self.db_host) try: self.db = server[settings.COUCH_DB_NAME] except: self.db = server.create(settings.COUCH_DB_NAME)
def set_up(self, settings, storage_name): BaseNosqlSession.set_up(self, settings, storage_name) self.connection = MongoClient(self.db_host) self.db = getattr(self.connection, self.settings.MONGO_DB_NAME)