Say I have a model:
Class Person(models.Model): firstname = models.CharField() lastname = models.CharField() birthday = models.DateField() # etc.
I don't see much solutions except for a big OR clause:
import operator from itertools import izip query = reduce( operator.or_, (Q(firstname=fn, lastname=ln) for fn, ln in izip(first_list, last_list)) ) Person.objects.filter(query)