{%extends "base.html"%}
{%block contents%}
<p>
-The following commitfests exist.
+The following commitfests exist in the system.
+{%if inprogresscf%}Current review work is done in commitfest <a href="/{{inprogresscf.id}}/">{{inprogresscf}}</a>.{%endif%}
+{%if opencf%}New patches should be submitted to commitfest <a href="/{{opencf.id}}/">{{opencf}}</a>.{%endif%}
</p>
<ul>
{%for c in commitfests%}
from ajax import doAttachThread
def home(request):
- commitfests = CommitFest.objects.all()
+ commitfests = list(CommitFest.objects.all())
+ opencf = next((c for c in commitfests if c.status == CommitFest.STATUS_OPEN), None)
+ inprogresscf = next((c for c in commitfests if c.status == CommitFest.STATUS_INPROGRESS), None)
+
return render_to_response('home.html', {
'commitfests': commitfests,
+ 'opencf': opencf,
+ 'inprogresscf': inprogresscf,
'title': 'Commitfests',
}, context_instance=RequestContext(request))