summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/views.py
diff options
context:
space:
mode:
authorJelte Fennema-Nio2024-06-22 11:17:23 +0000
committerMagnus Hagander2024-08-02 11:33:31 +0000
commit429ea84fe875505fa840eda246a83960f76dda28 (patch)
treeb9310507c25986eb777934c112289a82f20c366e /pgcommitfest/commitfest/views.py
parent485caaf65a10da53ce2c186c487150d2865de147 (diff)
Add /current link that links to either /inprogress or /open
Diffstat (limited to 'pgcommitfest/commitfest/views.py')
-rw-r--r--pgcommitfest/commitfest/views.py4
1 files changed, 4 insertions, 0 deletions
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()