November 2015
Beginner to intermediate
840 pages
26h 30m
English
While the practical goal of this chapter is to generate links, the actual goal is to focus on using multiple parts of Django and enforcing DRY.
The goal of DRY is to only ever define any piece of information once. We already have all of our links defined in the URL configuration, which means that we do not want to code links in raw HTML. If we change the regular expression pattern of a URL pattern, we should not have to make any other changes: we do not want to have to change links in each and every template.
The issue, of course, is that we are trying to accomplish the very opposite of what a regular expression pattern typically does: we are not interested in matching a string, we are interested ...
Read now
Unlock full access