summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest
diff options
context:
space:
mode:
Diffstat (limited to 'pgcommitfest/commitfest')
-rw-r--r--pgcommitfest/commitfest/views.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py
index fe5b560..b04030b 100644
--- a/pgcommitfest/commitfest/views.py
+++ b/pgcommitfest/commitfest/views.py
@@ -32,6 +32,16 @@ def home(request):
'title': 'Commitfests',
}, context_instance=RequestContext(request))
+def redir(request, what):
+ if what == 'open':
+ cf = get_object_or_404(CommitFest, status=CommitFest.STATUS_OPEN)
+ elif what == 'inprogress':
+ cf = get_object_or_404(CommitFest, status=CommitFest.STATUS_INPROGRESS)
+ else:
+ raise Http404()
+
+ return HttpResponseRedirect("/%s/" % cf.id)
+
def commitfest(request, cfid):
# Find ourselves
cf = get_object_or_404(CommitFest, pk=cfid)