get all ids in alist after filter django code example Example: django filter in list Blog.objects.filter(pk__in=[1, 4, 7])