From 429ea84fe875505fa840eda246a83960f76dda28 Mon Sep 17 00:00:00 2001 From: Jelte Fennema-Nio Date: Sat, 22 Jun 2024 13:17:23 +0200 Subject: Add /current link that links to either /inprogress or /open --- pgcommitfest/commitfest/views.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pgcommitfest/commitfest') diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py index 6a1f294..40ae3c5 100644 --- a/pgcommitfest/commitfest/views.py +++ b/pgcommitfest/commitfest/views.py @@ -86,6 +86,10 @@ def redir(request, what, end): cfs = list(CommitFest.objects.filter(status=CommitFest.STATUS_OPEN)) elif what == 'inprogress': cfs = list(CommitFest.objects.filter(status=CommitFest.STATUS_INPROGRESS)) + elif what == 'current': + cfs = list(CommitFest.objects.filter(status=CommitFest.STATUS_INPROGRESS)) + if len(cfs) == 0: + cfs = list(CommitFest.objects.filter(status=CommitFest.STATUS_OPEN)) else: raise Http404() -- cgit v1.2.3