Number of male and female participants requesting accommodation.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Thu, 09 Dec 2010 19:33:57 +0530
changeset 348 88cb9f42880c
parent 347 8d2db7a11434
child 349 4a07363689b5
Number of male and female participants requesting accommodation.
project/scipycon/registration/views.py
project/templates/registration/regstats.html
--- a/project/scipycon/registration/views.py	Thu Dec 09 19:21:04 2010 +0530
+++ b/project/scipycon/registration/views.py	Thu Dec 09 19:33:57 2010 +0530
@@ -325,6 +325,8 @@
     sprint_num = reg_q.filter(sprint=True).count()
 
     acco_q = Accommodation.objects.all()
+    male = acco_q.filter(sex='Male').count()
+    female = acco_q.filter(sex='Female').count()
     acco_days = []
     acco_days.append(acco_q.filter(accommodation_on_1st=True).count())
     acco_days.append(acco_q.filter(accommodation_on_2nd=True).count())
@@ -339,6 +341,8 @@
          'tut_num': tut_num,
          'sprint_num': sprint_num,
          'acco_days': acco_days,
+         'male': male,
+         'female':female,
          }))
 
 @login_required
--- a/project/templates/registration/regstats.html	Thu Dec 09 19:21:04 2010 +0530
+++ b/project/templates/registration/regstats.html	Thu Dec 09 19:33:57 2010 +0530
@@ -22,6 +22,14 @@
  <td>Sprint</td>
  <td>{{ sprint_num }}</td>
 </tr>
+<tr>
+ <td>Male participants requesting accommodation</td>
+ <td>{{ male }}</td>
+</tr>
+<tr>
+ <td>Female participants requesting accommodation</td>
+ <td>{{ female }}</td>
+</tr>
 {% for acco in acco_days %}
   <tr>
    <td>Accommodation on {{ forloop.counter|add:"11" }}</td>