

@classmethod
def find_one(klass, *args, **kwargs):
    "\n        Find a single object in the database, takes standard PyMongo-style\n        input parameters (blocking)::\n\n            thisUser = User.find_one({'username':username}) #Gets a specific user from the DB\n\n        "
    from Mojo.ServerHelpers.RunServer import BACKEND_COLLECTION, DATABASE
    klass.collection_name = klass.__name__
    if DATABASE:
        if BACKEND_COLLECTION:
            this_collection = BACKEND_COLLECTION(DATABASE, klass)
            ret_obj = this_collection.find_one(*args, **kwargs)
            return ret_obj

dataset/ETHPy150Open lonelycode/Mojo/Mojo/ObjectMapper/ModelPrototype.py Model.find_one/original