aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2021-04-15 16:26:30 +0300
committerGravatar ks129 <[email protected]>2021-05-03 20:19:50 +0300
commite943d24ffb9979b65cf29c048b7de984a61a3af1 (patch)
treefae9bb468bc9f693b8ae8a8f607fda25e9b410c7
parentMigrate URLs generation from Django's own RedirectView -> CustomRedirectView (diff)
Migrate redirections definition to not include testing args
-rw-r--r--pydis_site/settings.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/pydis_site/settings.py b/pydis_site/settings.py
index f9a5d72f..4e14ab70 100644
--- a/pydis_site/settings.py
+++ b/pydis_site/settings.py
@@ -293,13 +293,12 @@ EVENTS_PAGES_PATH = Path(BASE_DIR, "pydis_site", "templates", "events", "pages")
CONTENT_PAGES_PATH = Path(BASE_DIR, "pydis_site", "apps", "content", "resources")
# Define redirections here so these can be used for URLs and tests.
-# Format: "original-path/": ("route:name", "redirection_route_name", ("testing", "args"))
+# Format: "original-path/": (
+# "route:name", "redirection_route_name", ("destination", "args")
+# )
REDIRECTIONS = {
"pages/resources/": ("resources:index", "resources_index_redirect", ()),
- "pages/resources/<str:category>/": (
- "resources:resources", "resources_resources_redirect", ("reading",)
- ),
- "pages/events/": (
- "events:index", "events_index_redirect", ()
- )
+ "pages/resources/<str:category>/": ("resources:resources", "resources_resources_redirect", ()),
+ "pages/events/": ("events:index", "events_index_redirect", ()),
+ "pages/code-jams/": ("events:page", "events_code_jams_index_redirect", ("code-jams",)),
}