def put(self, todo_id): print("request.form:", request.form) print("todo form:", request.form['todo']) new_todo_obj = { "todo": request.form['todo'], "owner_id": request.form['owner_id'] } new_todo = ToDoModel(new_todo_obj) print("new_todo:", new_todo) new_todo.save() return {"new_todo": marshal(new_todo, todo_fields)}
def __init__(self): self.model = ToDoModel()