Exemplo n.º 1
0
    def __init__(self, collection = None):

        databaseHandler = MongoDatabaseHandler()

        if collection is None:
            self.collection = databaseHandler.get_shortURL_collection()
        else:
            self.collection = collection
Exemplo n.º 2
0
 def __init__(self):
     """ save the username and password """
     databaseHandler = MongoDatabaseHandler()
     self.collection = databaseHandler.get_users_collection()