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 | |
parent | f634c5212b59511109fc25b57d716bdfe56cd495 (diff) |
Direct links to interesting CFs
-rw-r--r-- | pgcommitfest/commitfest/templates/commitfest.html | 4 | ||||
-rw-r--r-- | pgcommitfest/commitfest/templates/home.html | 4 | ||||
-rw-r--r-- | pgcommitfest/commitfest/views.py | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/pgcommitfest/commitfest/templates/commitfest.html b/pgcommitfest/commitfest/templates/commitfest.html index fc31f69..19f2739 100644 --- a/pgcommitfest/commitfest/templates/commitfest.html +++ b/pgcommitfest/commitfest/templates/commitfest.html @@ -1,10 +1,6 @@ {%extends "base.html"%} {%load commitfest %} {%block contents%} -<p> -This is commitfest {{cf}}. -</p> - {%for p in patches %} {%ifchanged p.is_open%} {%if not forloop.first%} diff --git a/pgcommitfest/commitfest/templates/home.html b/pgcommitfest/commitfest/templates/home.html index 814c26e..522ae0a 100644 --- a/pgcommitfest/commitfest/templates/home.html +++ b/pgcommitfest/commitfest/templates/home.html @@ -1,7 +1,9 @@ {%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%} 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)) |