You can do this using values_list method.
blogs = Blog.objects.filter(author=author).values_list('id', flat=True)
See more at the Django queryset documentation.
You can do this using values_list method.
blogs = Blog.objects.filter(author=author).values_list('id', flat=True)
See more at the Django queryset documentation.