summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'pgcommitfest/commitfest/views.py')
-rw-r--r--pgcommitfest/commitfest/views.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py
index 30d8f2f..5e77d6e 100644
--- a/pgcommitfest/commitfest/views.py
+++ b/pgcommitfest/commitfest/views.py
@@ -16,9 +16,14 @@ from forms import PatchForm, NewPatchForm, CommentForm
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))