O'Reilly logo

Django 1.0 Web Site Development by Ayman Hourieh

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)

As discussed in the previous section, it is advisable to avoid rendering large query sets into one page, as 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. And as always, Django already has a component that implements this functionality, which is ready for us to use!

Pagination is the process of breaking content into pages. If we have a large query set of bookmarks, we split the query set into pages with 10 (or so) items on each, present the first page to the user, and provide links to browse other pages.

The Django pagination functionality is encapsulated in a class called Paginator, which ...

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