An important aspect of web usability is to break the data returned by your application into manageable pages. Presenting hundreds of records on a single page can result in pages that are large in size and result sets that are hard to scan for information. Django provides a Paginator
library that makes it easy to split your results into smaller sets.
In this chapter we will:
Create a test application for experimenting with pagination
Learn how to implement the Paginator using the interactive Django shell
See the SQL executed when using the Paginator
Construct a view using pagination
Implement navigational links for pagination in the template
Use pagination with generic views