def companies_matching(merchants):
    """
    Return a queryset for companies whose names contain case-insensitive
    matches for any of the `merchants`.
    """
q = Q()
for merchant in merchants:
    pass
django icontains with __in lookup