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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access