'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)
urlpatterns = patterns('',
url(r'^$', 'commitfest.views.home'),
url(r'^(\d+)/$', 'commitfest.views.commitfest'),
+ url(r'^(open|inprogress)/$', 'commitfest.views.redir'),
url(r'^(\d+)/(\d+)/$', 'commitfest.views.patch'),
url(r'^(\d+)/(\d+)/edit/$', 'commitfest.views.patchform'),
url(r'^(\d+)/new/$', 'commitfest.views.newpatch'),