-
-
Notifications
You must be signed in to change notification settings - Fork 670
Fix: Add permanent redirects for legacy sponsorship pages (Issue #2645) #2944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d41a12a
2b3ff57
25c221c
12f50cb
3f3fb80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |||||
| from django.contrib import admin | ||||||
| from django.contrib.staticfiles.urls import staticfiles_urlpatterns | ||||||
| from django.urls import include, path, re_path | ||||||
| from django.views.generic.base import TemplateView | ||||||
| from django.views.generic.base import RedirectView, TemplateView | ||||||
|
|
||||||
| from apps.cms.views import custom_404 | ||||||
| from apps.downloads.views import ReleaseEditButton | ||||||
|
|
@@ -35,6 +35,14 @@ | |||||
| path("blogs/", include("apps.blogs.urls")), | ||||||
| path("inner/", TemplateView.as_view(template_name="python/inner.html"), name="inner"), | ||||||
| # other section landing pages | ||||||
| path( | ||||||
| "psf/sponsorship-old/", | ||||||
| RedirectView.as_view(pattern_name="psf-sponsors", permanent=True), | ||||||
|
||||||
| RedirectView.as_view(pattern_name="psf-sponsors", permanent=True), | |
| RedirectView.as_view(url="/psf/sponsorship/", permanent=True), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expected redirect target for
/psf/sponsorship-old/is asserted asreverse('psf-sponsors'). If the legacy redirect destination changes (e.g., to/psf/sponsorship/), this test needs to be updated to assert against the same canonical target to avoid locking in the wrong behavior.