Example #1
0
 def get(cls, todo_name):
     res = db.session.query(cls).\
         filter(cls.todo_name == todo_name).first()
     if res:
         return res.to_dict()
     raise NotFoundResourceException(
         NOT_FOUND_RESOURCE_MESSAGE.format(cls.__name__, todo_name))
Example #2
0
 def get(cls, todo_name):
     res = db.session.query(cls).\
         filter(cls.todo_name == todo_name).first()
     if res:
         return res.to_dict()
     raise NotFoundResourceException(
         NOT_FOUND_RESOURCE_MESSAGE.format(cls.__name__, todo_name))