6.1 Introduction
Hyperlinks, casually called links, are the key feature of the web. The ability to click on text or an image to navigate to a new webpage is a basic necessity for any website. Without this functionality, you would have to enter a URL for each and every webpage you wished to view.
For the most part, our website does not make use of links. We have skeleton links: HTML anchor <a> tags without the href attribute defined (the exception being the links in the Newslink model, but these links point to external sources, not our own webpages).
Building a link in HTML is trivial. To create a link to our tag list webpage, we could simply code <a href="/tag/">. However, maintaining the Don’t Repeat Yourself (DRY) principle in Django while ...
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