2👍
✅
If it’s still just a link, there’s no reason not to append the fragment to the generated URL.
<a href="{% url 'courses:course-detail' course.id %}#/exams">Go to Exams</a>
<a href="{% url 'courses:course-detail' course.id %}#/lectures">Go to Lectures</a>
<a href="{% url 'courses:course-detail' course.id %}#/homework">Go to Homework</a>
<a href="{% url 'courses:course-detail' course.id %}#/results">Go to Results</a>
Source:stackexchange.com