I would like to implement pagination in django using jquery ajax. Here is my views.py like that:
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from .models import blog
def home(request):
blogs = blog.objects.all()
page = request.GET.get('page', 1)
paginator = Paginator(blogs, 5) #number of blogs you want to paginate
try:
blogs =
β¦
Top comments (0)