how to filter using related set field in django-filter code example Example: django filter on related field len(Collection.objects.filter(item__flag=True).distinct())