diff --git a/pgcommitfest/commitfest/templates/all_commitfests.html b/pgcommitfest/commitfest/templates/all_commitfests.html
deleted file mode 100644
index 6d983df1..00000000
--- a/pgcommitfest/commitfest/templates/all_commitfests.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{%extends "base.html"%}
-{%block contents%}
-
- {%for c in commitfests%}
- - {{c}} ({{c.statusstring}} - {{c.periodstring}})
- {%endfor%}
-
-
-{%endblock%}
-
diff --git a/pgcommitfest/commitfest/templates/archive.html b/pgcommitfest/commitfest/templates/archive.html
index f22c6161..6d983df1 100644
--- a/pgcommitfest/commitfest/templates/archive.html
+++ b/pgcommitfest/commitfest/templates/archive.html
@@ -2,8 +2,9 @@
{%block contents%}
{%for c in commitfests%}
- - {{c}} ({{c.statusstring}}{%if c.startdate%} - {{c.periodstring}}{%endif%})
+ - {{c}} ({{c.statusstring}} - {{c.periodstring}})
{%endfor%}
+
{%endblock%}
diff --git a/pgcommitfest/commitfest/templates/base.html b/pgcommitfest/commitfest/templates/base.html
index bbd76210..8293b048 100644
--- a/pgcommitfest/commitfest/templates/base.html
+++ b/pgcommitfest/commitfest/templates/base.html
@@ -46,12 +46,12 @@
Draft CF
-
+
More
diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py
index ef0a3831..b6659ac8 100644
--- a/pgcommitfest/commitfest/views.py
+++ b/pgcommitfest/commitfest/views.py
@@ -8,6 +8,7 @@
Http404,
HttpResponse,
HttpResponseForbidden,
+ HttpResponsePermanentRedirect,
HttpResponseRedirect,
)
from django.shortcuts import get_object_or_404, render
@@ -193,12 +194,19 @@ def me_legacy_redirect(request):
return HttpResponseRedirect("/#dashboard")
-def commitfest_history(request):
+def commitfest_history_legacy_redirect(request):
+ # For a while the list of all commitfests lived here, next to an unsorted
+ # duplicate at /archive/. The two were merged under /archive/ since that's
+ # the shorter URL, but links to this one should keep working.
+ return HttpResponsePermanentRedirect("/archive/")
+
+
+def archive(request):
cfs = list(CommitFest.objects.order_by("-enddate"))
return render(
request,
- "all_commitfests.html",
+ "archive.html",
{
"commitfests": cfs,
"title": "Commitfest history",
@@ -220,21 +228,6 @@ def help(request):
)
-def archive(request):
- commitfests = list(CommitFest.objects.all())
-
- return render(
- request,
- "archive.html",
- {
- "commitfests": commitfests,
- "title": "Commitfests",
- "header_activity": "Activity log",
- "header_activity_link": "activity/",
- },
- )
-
-
def activity(request, cfid=None, rss=None):
# Number of notes to fetch
if rss:
diff --git a/pgcommitfest/urls.py b/pgcommitfest/urls.py
index d246241a..3e0aaa46 100644
--- a/pgcommitfest/urls.py
+++ b/pgcommitfest/urls.py
@@ -21,7 +21,7 @@
re_path(r"^api/v1/commitfests/(\d+)/patches$", apiv1.commitfest_patches),
re_path(r"^api/v1/patches/(\d+)/threads$", apiv1.patch_threads),
re_path(r"^help/$", views.help),
- re_path(r"^commitfest_history/$", views.commitfest_history),
+ re_path(r"^commitfest_history/$", views.commitfest_history_legacy_redirect),
re_path(r"^me/$", views.me_legacy_redirect),
re_path(r"^archive/$", views.archive),
re_path(r"^activity(?P\.rss)?/", views.activity),