how to filter based on two choice value in django code example Example: django filter on related field len(Collection.objects.filter(item__flag=True).distinct())