Number of male and female participants requesting accommodation.
--- 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>