4👍
Use icontains
–(Django doc) lookup
def filter_tasks(request: HttpRequest):
context = {
'task_list': Task.objects.filter(
content__icontains=request.POST['content']
)
}
return render(request, 'tasks/task_list.html', context)
👤JPG
Source:stackexchange.com