From e42e00f83a6729fe2e45348666ebd1ccdd0b8cd8 Mon Sep 17 00:00:00 2001 From: Anand Chitipothu Date: Thu, 1 Apr 2021 06:32:32 +0000 Subject: [PATCH] Added nice urls to sketch pages. The URL of a sketch will be `/skectes/`. That would still be like `/skectes/SKETCH-123`. It would interesting to try to make it `/sketches/123`. --- community/hooks.py | 1 + community/www/sketches/index.html | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/community/hooks.py b/community/hooks.py index 2bfcd60f..cb60397d 100644 --- a/community/hooks.py +++ b/community/hooks.py @@ -128,6 +128,7 @@ scheduler_events = { # auto_cancel_exempted_doctypes = ["Auto Repeat"] website_route_rules = [ + {"from_route": "/sketches/", "to_route": "sketches/sketch"}, {"from_route": "/courses/", "to_route": "courses/course"}, {"from_route": "/courses//", "to_route": "courses/topic"}, ] diff --git a/community/www/sketches/index.html b/community/www/sketches/index.html index e99ff675..2a6381f0 100644 --- a/community/www/sketches/index.html +++ b/community/www/sketches/index.html @@ -13,7 +13,7 @@
@@ -21,13 +21,13 @@