14.1 Introduction

Pagination is simple: given a list of items, pagination splits up the list across multiple webpages. At the moment, given how little data exists in our database, pagination seems unnecessary. However, as we add data to our database, pagination will become quite useful. For instance, we won’t want to show all of our blog posts to the user (particularly if we have 250 of them). Typically, the user will only be interested in seeing the first five. Pagination provides not only a simple way to display the first five items but also the ability to enable the user to navigate our website to see the next five blog posts.

While implementing pagination is simple, deciding whether to implement is not. Pagination is a means of navigation, ...

Get Django Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.