from database import db from model.todo import Todo db.Database.initialize() # let try insert new record to db new_todo = Todo.get_all() print(new_todo)
def getall_method(): res = Todo.get_all() for r in res: if "_id" in r: del r["_id"] return Response(json.dumps(res), mimetype='application/json')