diff --git a/todolist/views.py b/todolist/views.py index 14d113b..6ad011c 100644 --- a/todolist/views.py +++ b/todolist/views.py @@ -20,7 +20,7 @@ def index(request): #the index view return redirect("/") #reloading the page if "taskDelete" in request.POST: #checking if there is a request to delete a todo - checkedlist = request.POST["checkedbox"] #checked todos to be deleted + checkedlist = request.POST.getlist("checkedbox") #checked todos to be deleted for todo_id in checkedlist: todo = TodoList.objects.get(id=int(todo_id)) #getting todo id todo.delete() #deleting todo