Пример #1
0
from todo import Todo

todo = Todo()
data = {
    'title': 66,
    'body': 'validation done for the insertion',
}
todo.create(data)
Пример #2
0
def todo_create():
    # text = request.form.get('item')
    text = request.form['item']
    todo = Todo.create(text)
    print(f'Todo created: {todo.__dict__}')
    return redirect(url_for('root'))