'title': 'Patch search results',
})
+def patch_redirect(request, patchid):
+ last_commitfest = PatchOnCommitFest.objects.select_related('commitfest').filter(patch_id=patchid).order_by('-commitfest__startdate').first()
+ if not last_commitfest:
+ raise Http404("Patch not found")
+ return HttpResponseRedirect(f'/{last_commitfest.commitfest_id}/{patchid}/')
+
def patch(request, cfid, patchid):
cf = get_object_or_404(CommitFest, pk=cfid)
re_path(r'^(\d+)/$', views.commitfest),
re_path(r'^(open|inprogress|current)/(.*)$', views.redir),
re_path(r'^(?P<cfid>\d+)/activity(?P<rss>\.rss)?/$', views.activity),
+ re_path(r'^patch/(\d+)/$', views.patch_redirect),
re_path(r'^(\d+)/(\d+)/$', views.patch),
re_path(r'^(\d+)/(\d+)/edit/$', views.patchform),
re_path(r'^(\d+)/new/$', views.newpatch),