Is there a way to obtain a QuerySet in Django so that the remaining objects satisfy at least one of a number of constrains (i.e. an OR statement)?
Something like:
remaining = Fruits.objects.all()
fruit_type = ['apple', 'orange'] # input from user
for fruit in fruit_type:
remaining = remaining.filter(FruitType__icontains=fruit)
However, the above only returns FruitTypes that contain both 'orange' AND 'apple' (rather than orange OR apple).