Пример #1
0
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)

Пример #2
0
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')