Django Latest Blog


Best learning platform for you
Blog Home » Python » The Python Journal

The Python Journal



portfolio | Nov. 28, 2019, 11:46 a.m.

Give Paginator a list of objects, plus the number of items you’d like to have on each page, and it gives you methods for accessing the items for each page:

 

 

from django.core.paginator import Paginator
objects = ['john', 'paul', 'george', 'ringo']
p = Paginator(objects, 2)

 

Tags: Python Data Science Python Tutorial

About: portfolio

Nov. 28, 2019, 11:46 a.m.

In this step-by-step tutorial, you'll see common examples of invalid syntax in Python and learn how to resolve the issue

Comment Now