November 2015
Beginner to intermediate
840 pages
26h 30m
English
Our goal in this section is to paginate the tag list webpage. Instead of using the query part of the URL, we pass the page number to the path part of the URL. This means that, instead of using request.GET to get the information about the query information, we must get it from the URL configuration (just as we get slug information).
Now we are left with a choice. We could create two URL patterns: one to match /tag/ and one to match /tag/2/. Or we could try to use a single URL pattern for both of those URL paths.
As it turns out, we will need to use two URL patterns. We start by trying to use a single regular expression pattern to match both URL path possibilities and discover why we need ...
Read now
Unlock full access