Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
    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)
Esempio n. 4
0
    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)