Added nice URLs to course and topic pages.

The URL of a course will be `/courses/<course-name>` and a topic will be
`/courses/<course-name>/<topic-name>`.

Implemented this by adding entries to `website_route_rules`.
This commit is contained in:
Anand Chitipothu
2021-03-31 11:33:59 +00:00
parent 87acbb9f6e
commit 53af969a2e
4 changed files with 9 additions and 5 deletions

View File

@@ -43,7 +43,7 @@
<div class="list-group">
{% for topic in course.topics %}
<div class="list-group-item">
<h5><a href="/courses/topic?course={{course.name}}&topic={{topic.name}}">{{topic.title}}</a></h5>
<h5><a href="/courses/{{course.name}}/{{topic.name}}">{{topic.title}}</a></h5>
<div>{{topic.preview | markdown }}</div>
</div>
{% endfor %}