How can I chain Django's "in" and "iexact" queryset field lookups?
Here's my solution, which uses Q objects instead:
name_list = ['Alpha', 'bEtA', 'omegA']
q_list = map(lambda n: Q(name__iexact=n), name_list)
q_list = reduce(lambda a, b: a | b, q_list)
MyModel.objects.filter(q_list)
name_list = ['Alpha', 'bEtA', 'omegA']
results = MyModel.objects.none()
for name in name_list:
results |= MyModel.objects.filter(name__iexact=name)
Ok I test it and it works :)