Django Querying for all models who contain any item in a list with contained_by


Example

This query returns all cones with either a mint scoop or a vanilla scoop.

minty_vanilla_cones = IceCream.objects.filter(scoops__contained_by=[MINT, VANILLA])