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

@@ -127,3 +127,7 @@ scheduler_events = {
#
# auto_cancel_exempted_doctypes = ["Auto Repeat"]
website_route_rules = [
{"from_route": "/courses/<course>", "to_route": "courses/course"},
{"from_route": "/courses/<course>/<topic>", "to_route": "courses/topic"},
]