14.6 Putting It All Together

Pagination is a tool for providing navigation to the user by shortening the content on each page. The pagination tools Django provides are mainly about splitting up data in smaller chunks. For most of the necessities around pagination, such as adhering to DRY while creating pagination links, Django expects you to sort out the problem yourself.

In the process of learning to paginate, we discovered that the URL patterns allow regular expression optional patterns but that the reverse() function Django provides simply ignores them. They might be useful in certain contexts, but they are typically to be avoided.

We return to pagination in the next chapter and in Chapter 17. For the moment, let’s move on to see other display ...

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.