November 2015
Beginner to intermediate
840 pages
26h 30m
English
To reinforce what we already know and expand our knowledge of URL patterns, we now create a second webpage. Our webpage will display the information for a single Tag object. We call our function view tag_detail(). Let’s begin by adding a URL pattern.
In Chapter 3, we specifically added SlugField to our Tag model to allow for the simple creation of unique URLs. We intend to use it now for our URL pattern. We want the request for /tag/django/ to show the webpage for the django Tag and the request for /tag/web/ to show the webpage for the web Tag.
This is the first gap in our knowledge. How can we get a single URL pattern to recognize both /tag/django/ and /tag/web/? The second gap in our knowledge is that we have ...
Read now
Unlock full access