[Answered ]-How to add pagination to django.contrib.comments?

2đź‘Ť

In the views.py file

def CommentView(request):
    allComments = UserExperience.objects.all()
    paginator = Paginator(comments, 10)
    comment = paginator.page(1)

The value of “comment” will be [0…9] comment.

👤iraycd

Leave a comment