コード例 #1
0
def process():
    id = request.form.get('id')
    if request.form.get('submit') == 'delete':
        todo.delete_task(id)
    else:
        title = request.form.get('title')
        date = request.form.get('date')
        todo.edit_task(id, title, date)
    notes = todo.read_data_from_file()
    return render_template("edit.html", notes=notes)
コード例 #2
0
def index():

    return render_template("list.html", notes=todo.read_data_from_file())
コード例 #3
0
def button_edit():
    notes = todo.read_data_from_file()
    return render_template("edit.html", notes=notes)
コード例 #4
0
def add_note():
    taskname = request.args.get('name')
    taskdate = request.args.get('date')
    todo.new_task(taskname, taskdate)
    return render_template("list.html", notes=todo.read_data_from_file())
コード例 #5
0
def button_edit():
    return render_template("edit.html",
                           notes=sort_notes(todo.read_data_from_file()))
コード例 #6
0
def list_notes():
    return render_template("list.html",
                           notes=sort_notes(todo.read_data_from_file()))
コード例 #7
0
def list_filtered_notes():
    search = request.args.get('search')
    return render_template("list.html",
                           notes=sort_notes(todo.read_data_from_file(search)))