diff options
author | Magnus Hagander | 2013-07-19 15:21:26 +0000 |
---|---|---|
committer | Magnus Hagander | 2013-07-19 15:21:26 +0000 |
commit | cd605547cc679bba7fdb2d8d5d2639c5a152be95 (patch) | |
tree | 42f35c76f1ffc1b914606018c5dae53aa6e11daf /pgcommitfest/commitfest/views.py | |
parent | f634c5212b59511109fc25b57d716bdfe56cd495 (diff) |
Direct links to interesting CFs
Diffstat (limited to 'pgcommitfest/commitfest/views.py')
-rw-r--r-- | pgcommitfest/commitfest/views.py | 7 |
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)) |