queryset django to list code example Example: create a queryset list django Books.objects.filter(pk__in=a)