[Django]-Django: How to filter for keyword in multiple fields on a model?

8👍

You need to use Q objects.

Article.objects.filter(Q(title__icontains='candy')|Q(body__icontains='candy'))
👤Todor

Leave a comment