Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pydis_site/apps/redirect/redirects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ off-topic_redirect:
redirect_route: "content:page_category"
redirect_arguments: ["guides/pydis-guides/off-topic-etiquette"]

good_questions_redirect_alt:
# In a few places we were linking to a version outside of the guides app.
original_path: pages/asking-good-questions/
redirect_route: "content:page_category"
redirect_arguments: ["guides/pydis-guides/asking-good-questions"]

# Resources
resources_index_redirect:
original_path: pages/resources/
Expand Down
2 changes: 1 addition & 1 deletion pydis_site/apps/redirect/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ def test_redirects(self) -> None:
f"home:{data['redirect_route']}",
args=expected_args
),
status_code=302
status_code=301
)
self.assertEqual(resp.status_code, 200)
4 changes: 1 addition & 3 deletions pydis_site/apps/redirect/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
class CustomRedirectView(RedirectView):
"""Extended RedirectView for manual route args."""

# We want temporary redirects for the time being, after this is running on prod and
# stable we can enable permanent redirects.
permanent = False
permanent = True
static_args = ()
prefix_redirect = False

Expand Down