I have a interesting Django problem.
Consider the following:
Model.objects.filter(Q(id=\'test1\') and Q(id=\'test2\'))
this returns the
I think you want OR here, and not AND
OR
AND
filters = ['test1', 'test2', 'test3', 'test4'] filtered = Model.objects.filter(Q(id = filters[0])) for f in filters[1:]: subset = Model.objects.filter(Q(id = f)) filtered = filtered | subset