O'Reilly logo

Learning Django Web Development by Ratan Kumar, Sanjeev Jaiswal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Organizing content into pages – pagination

In previous chapters, we have covered things such as listing down the tweets of users and listing down most followed users, but consider a use case when these small numbers scale up and we start getting a large number of results for each type of query. To cover such a situation, we should manipulate our code so as to make it support pagination.

The page would increase in size, and finding an item within the page would become difficult. Fortunately, there is a simple and intuitive solution to this: pagination. Pagination is the process of breaking content into pages. And, as always, Django already has a component that implements this functionality, ready for us to use!

If we have a large set of tweets, we ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required