I want to do the following thing:
lets say I have:
query_terms = ["A", "B"]
And what is needed is the following query:
House.objects.filter(
Q(name__icontains="A") | Q(building__name__icontains="A",
Q(name__icontains="B") | Q(building__name__icontains="B"
)
I don't know how to join this "OR" statements together with "AND" having a dynamic query_terms list