Add a search input on the task list page that filters tasks by title.
Suggested approach
- Add a text input to
task_list.html that submits a q query parameter
- In the list view, read
request.GET.get('q') and filter with Task.objects.filter(title__icontains=q)
- Keep the existing list behavior when no query is provided
This is listed as one of the Learning Exercises in the README.
Add a search input on the task list page that filters tasks by title.
Suggested approach
task_list.htmlthat submits aqquery parameterrequest.GET.get('q')and filter withTask.objects.filter(title__icontains=q)This is listed as one of the Learning Exercises in the README.