Skip to content

Commit

Permalink
urls: Fix redirects of pages with arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjwebb committed Mar 5, 2025
1 parent 677666d commit 1a48840
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion iati_dashboard/tests/test_page_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"publisher/zsl.html",
"codelist/2/[email protected]",
"element/[email protected]",
"org_type/.html",
"org_type/accountable_org.html",
"registration_agencies.html",
]

Expand Down
12 changes: 6 additions & 6 deletions iati_dashboard/ui/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,18 @@
path("org_ids.html", RedirectView.as_view(pattern_name="dash-exploringdata-orgids", permanent=True)),
path("faq.html", RedirectView.as_view(pattern_name="dash-faq", permanent=True)),
path("licenses.html", RedirectView.as_view(pattern_name="dash-licenses", permanent=True)),
re_path(r"license\/\S*.html", RedirectView.as_view(pattern_name="dash-licenses", permanent=True)),
re_path(r"license\/(\S*).html", RedirectView.as_view(pattern_name="dash-licenses-detail", permanent=True)),
re_path(
r"publisher\/\S*.html", RedirectView.as_view(pattern_name="dash-headlines-publishers", permanent=True)
r"publisher\/(\S*).html", RedirectView.as_view(pattern_name="dash-headlines-publisher-detail", permanent=True)
),
re_path(
r"codelist\/\d\/\S*.html",
RedirectView.as_view(pattern_name="dash-exploringdata-codelists", permanent=True),
r"codelist\/(\d)\/(\S*).html",
RedirectView.as_view(pattern_name="dash-exploringdata-codelists-detail", permanent=True),
),
re_path(
r"element\/\S*.html", RedirectView.as_view(pattern_name="dash-exploringdata-elements", permanent=True)
r"element\/(\S*).html", RedirectView.as_view(pattern_name="dash-exploringdata-elements-detail", permanent=True)
),
re_path(r"org_type\/\S*.html", RedirectView.as_view(pattern_name="dash-exploringdata-orgids", permanent=True)),
re_path(r"org_type\/(\S*).html", RedirectView.as_view(pattern_name="dash-exploringdata-orgtypes-detail", permanent=True)),
]
+ static("generated", document_root="out")
+ static("stats", document_root="stats-calculated")
Expand Down

0 comments on commit 1a48840

Please sign in to comment.