1👍
✅
You are close. The use of Q() for creating complex OR queries is the key. Try something like this:
import operator
qs = []
for r in all_records:
qs.append(Q(name=r.name, thing=r.thing, more=r.more))
Users.objects.filter(reduce(operator.or_, qs))
Source:stackexchange.com