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)
def index(): return render_template("list.html", notes=todo.read_data_from_file())
def button_edit(): notes = todo.read_data_from_file() return render_template("edit.html", notes=notes)
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())
def button_edit(): return render_template("edit.html", notes=sort_notes(todo.read_data_from_file()))
def list_notes(): return render_template("list.html", notes=sort_notes(todo.read_data_from_file()))
def list_filtered_notes(): search = request.args.get('search') return render_template("list.html", notes=sort_notes(todo.read_data_from_file(search)))