Hard-coded URL in template

Hard-coding urls makes changing URLs harder, and makes linking to the wrong page easier - so harms maintainability.

Django encourages giving URLs a name so they can be resoved later (rather than hard coding the URL).

This be taken advantage of by defining a `name` in the url.py entry, and then using that name in templates.

If our GitHub code review bot spots this issue in your pull request it gives this advice:

django-doctorbotsuggested changes just now
template.html
1
+
<a href="/articles/">Go to articles</a>

Hard-coding urls makes changing URLs harder, and makes linking to the wrong page easier - so harms maintainability.

Read more
Suggested changes
-
<a href="/articles/">Go to articles</a>
+
<a href="{% url 'articles-list' %}">Go to articles</a>
Commit suggestion
Update template.html

Instantly check if you have this issue for free

    Works with tools you use

    Read about how it works.