如何通过此使用分页不起作用

views.py paginate_by is not working, is there any alternative for this.

class PostListView(ListView):
    template_name = 'all_users/doctor/main.html'
    model = Post
    context_object_name = 'posts'
    paginate_by = 3

    def get(self, request, **kwargs):
        query = self.request.user
        post = Post.objects.filter(author=User.objects.get(username=query)).order_by('-date_posted')
        context = {
            'posts': post,
        }
        return render(request, self.template_name, context)