In this lesson, you’re going to add some Bootstrap style to what you’ve created so far in your template to make it look a bit nicer.
Bootstrap Template Issues
If you copy the Bootstrap code from the associated tutorial without applying any changes, then you will run into an error. As eawongtheprogrammer mentions in their comment, this is because of the following line:
<a href="{% url 'projects:project_detail' project.pk %}" class="btn btn-primary">
Read More
</a>
The code is referencing a route that you haven’t built yet, which throws Django into light confusion. Change the href
attribute value to a hashtag (#
) to fix this issue:
Gascowin on Oct. 20, 2019
Hi, you mentioned that the html you copy-pasted is in “the associated article”. Can you please direct me to this? I cannot for the life of me seem to find it anywhere. Thanks.