def playWithModel(): doc = TestDocument(55, "Ismail", 75) doc.save() return TestDocument.count()
def getModelObj(id): doc = TestDocument.findOne(Document({'id': id})) return doc.toDict()