[Answered ]-How to add to my search views, option to search by `Category` name?

2👍

You can do:

d = Document.objects.filter(Q(title__contains=term) | Q(
            content__contains=term) | Q(category__name__contains=term))

Here is the relevant documentation on lookups that span relationships

Leave a comment