--- a/project/scipycon/registration/forms.py Wed Nov 03 00:13:52 2010 +0530
+++ b/project/scipycon/registration/forms.py Wed Nov 03 00:58:47 2010 +0530
@@ -33,9 +33,7 @@
allow_contact = forms.BooleanField(required=False, label=u'Contact',
help_text=u'May organizers of SciPy.in contact you after the event?')
conference = forms.BooleanField(required=False, label=u'Conference',
- help_text=u"""Do you intend to attend SciPy.in 2010 conference?
- Note: Only conference has an registration fee of Rs.200 which you will
- pay on the spot.""")
+ help_text=u"""Do you intend to attend SciPy.in 2010 conference?""")
tutorial = forms.BooleanField(required=False, label=u'Tutorial',
help_text=u'Do you intend to attend the tutorials?')
sprint = forms.BooleanField(required=False, label=u'Sprint',
--- a/project/scipycon/registration/views.py Wed Nov 03 00:13:52 2010 +0530
+++ b/project/scipycon/registration/views.py Wed Nov 03 00:58:47 2010 +0530
@@ -252,3 +252,26 @@
'message' : message,
'login_form' : login_form
}))
+
+
+@login_required
+def regstats(request, scope,
+ template_name='registration/regstats.html'):
+ """View that gives the statistics of registrants.
+ """
+
+ if not request.user.is_staff:
+ redirect_to = reverse('scipycon_login', kwargs={'scope': scope})
+
+
+ q = Registration.objects.all()
+ conf_num = q.filter(conference=True).count()
+ tut_num = q.filter(tutorial=True).count()
+ sprint_num = q.filter(sprint=True).count()
+
+ return render_to_response(template_name, RequestContext(request,
+ {'params': {'scope': scope},
+ 'conf_num': conf_num,
+ 'tut_num': tut_num,
+ 'sprint_num': sprint_num,
+ }))
\ No newline at end of file
--- a/project/static/css/styles.css Wed Nov 03 00:13:52 2010 +0530
+++ b/project/static/css/styles.css Wed Nov 03 00:58:47 2010 +0530
@@ -113,6 +113,32 @@
padding: 4px 6px;
}
+table.scipycon-default-border
+{
+ border-width: 2px;
+ border-spacing: 2px;
+ border-style: outset;
+ border-color: gray;
+ border-collapse: separate;
+}
+
+table.scipycon-default-border td
+{
+ border-width: 1px;
+ padding: 5px 15px;
+ border-style: inset;
+ border-color: gray;
+}
+
+table.scipycon-default-border th
+{
+ border-width: 1px;
+ border-style: inset;
+ border-color: gray;
+ font-weight: bold;
+ padding: 4px 6px;
+}
+
table.scipycon-default a
{
text-decoration: none;
--- a/project/templates/_menu.html Wed Nov 03 00:13:52 2010 +0530
+++ b/project/templates/_menu.html Wed Nov 03 00:58:47 2010 +0530
@@ -72,7 +72,7 @@
<li><a href="/{{ params.scope }}/publicity/">Publicity</a></li>
<li><a href="/{{ params.scope }}/organizers/">Organizers</a></li>
{% if user.is_staff %}
- <li><a href="/{{ params.scope }}/howto/">HowTo</a></li>
+ <li><a href="/{{ params.scope }}/regstats/">Registration Statistics</a></li>
{% endif %}
</ul>
</div>
--- a/project/templates/_right_menu.html Wed Nov 03 00:13:52 2010 +0530
+++ b/project/templates/_right_menu.html Wed Nov 03 00:58:47 2010 +0530
@@ -1,9 +1,9 @@
<div id="right-inner">
<h2>Important dates</h2>
<p><ul>
- <li>Saturday, Oct. 30: Abstracts Due</li>
- <li>Friday, Nov. 5: Schedule announced
- <li>Tuesday, Nov. 30: Proceedings paper submission due
+ <li>Wednesday, Nov. 10: Abstracts Due</li>
+ <li>Monday, Nov. 15: Schedule announced
+ <li>Sunday, Dec. 05: Proceedings paper submission due
<li>Monday-Tuesday, Dec. 13-14: Conference
<li>Wednesday-Friday, Dec. 15-17: Tutorials/Sprints
<li>Saturday, Dec. 18: Sprints
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project/templates/registration/regstats.html Wed Nov 03 00:58:47 2010 +0530
@@ -0,0 +1,26 @@
+{% extends "base.html" %}
+
+{% block title %}Registration Statistics{% endblock %}
+
+{% block content %}
+<h1>Registration Statistics</h1>
+
+<table class="scipycon-default-border">
+<tr>
+ <th>Event</th>
+ <th>Number of people registered</th>
+</tr>
+<tr>
+ <td>Conference</td>
+ <td>{{ conf_num }}</td>
+</tr>
+<tr>
+ <td>Tutorials</td>
+ <td>{{ tut_num }}</td>
+</tr>
+<tr>
+ <td>Sprint</td>
+ <td>{{ sprint_num }}</td>
+</tr>
+</table>
+{% endblock content %}
--- a/project/templates/registration/submit-registration.html Wed Nov 03 00:13:52 2010 +0530
+++ b/project/templates/registration/submit-registration.html Wed Nov 03 00:58:47 2010 +0530
@@ -65,6 +65,11 @@
<fieldset>
<legend>Details</legend>
+ <strong>SciPy.in has a registration fee and nominal charges for
+ accommodation of out station students and teachers. Please
+ make sure you read the details before you register.
+ <a href="{% url scipycon_fees params.scope %}">Click here</a>
+ for details.</strong>
<table class="scipycon-default required">
{% for field in registration_form.personal_fields %}
<tr class="{% cycle odd,even %}">
--- a/project/templates/user/account.html Wed Nov 03 00:13:52 2010 +0530
+++ b/project/templates/user/account.html Wed Nov 03 00:58:47 2010 +0530
@@ -100,8 +100,7 @@
</tr>
</table>
<p>
- <a href="{% url scipycon_edit_registration params.scope
- registration.id %}" title="Edit">Edit Registration</a>
+ <a href="{% url scipycon_edit_registration params.scope registration.id %}" title="Edit">Edit Registration</a>
</p>
</div>
{% endif %}
--- a/project/urls.py Wed Nov 03 00:13:52 2010 +0530
+++ b/project/urls.py Wed Nov 03 00:58:47 2010 +0530
@@ -51,6 +51,8 @@
'submit_registration', name='scipycon_submit_registration'),
url(r'^%s/edit-registration/(?P<id>\d+)/$' % (SCOPE_ARG_PATTERN),
'edit_registration', name='scipycon_edit_registration'),
+ url(r'^%s/regstats/'% (SCOPE_ARG_PATTERN),
+ 'regstats', name="scipycon_regstats"),
)
# Authentication and Profile