It seems that __in is only suitable for integers. I am trying to filter by strings.
I've tried this but it does not work.
groups = ['foo', 'bar']
args = []
for group in groups:
args.append(Q(name=group))
group_ids = Group.objects.filter(*args)
What is the preferred way to dynamically filter a Django queryset using strings?
__inis only suitable for integers? It works just fine for strings.exactmatch (e.g.iexact,contains).