def del_task(): del_title= request.form['del_title'] db = model.connect_db() # Assume that all tasks are attached to user 1. task_id = model.remove_task(db, int(del_title)) return redirect("/new_task")
def remove_task(): task_id = str(request.form.get("task_id")) model.remove_task(task_id) return "Task will be removed"
def del_task(): del_title= request.form['del_title'] # Assume that all tasks are attached to user 1. task_id = model.remove_task(g.db, int(del_title)) return redirect("/tasks")