Direct links to interesting CFs
authorMagnus Hagander <magnus@hagander.net>
Fri, 19 Jul 2013 15:21:26 +0000 (17:21 +0200)
committerMagnus Hagander <magnus@hagander.net>
Fri, 19 Jul 2013 15:21:26 +0000 (17:21 +0200)
pgcommitfest/commitfest/templates/commitfest.html
pgcommitfest/commitfest/templates/home.html
pgcommitfest/commitfest/views.py

index fc31f69d6a13b0739acf559add2d017255d8689e..19f2739fb21dce0d8ccd86c9ef20a5a078245a4c 100644 (file)
@@ -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%}
index 814c26e167183f24424e1fd6e34f9ce5f87760e4..522ae0ace81fb173c626d7d3e0c0fe6dac2ab830 100644 (file)
@@ -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%}
index 30d8f2fb8d23fa0e4295ac5f482e9a28ab53d23d..5e77d6e7b5c8459289d6a4082b23c77e69713de9 100644 (file)
@@ -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))