예제 #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
파일: app.py 프로젝트: devmrh/reactpymongo
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')