diff options
Diffstat (limited to 'project')
-rw-r--r-- | project/scipycon/registration/forms.py | 4 | ||||
-rw-r--r-- | project/scipycon/registration/views.py | 23 | ||||
-rw-r--r-- | project/static/css/styles.css | 26 | ||||
-rw-r--r-- | project/templates/_menu.html | 2 | ||||
-rw-r--r-- | project/templates/_right_menu.html | 6 | ||||
-rw-r--r-- | project/templates/registration/regstats.html | 26 | ||||
-rw-r--r-- | project/templates/registration/submit-registration.html | 5 | ||||
-rw-r--r-- | project/templates/user/account.html | 3 | ||||
-rw-r--r-- | project/urls.py | 2 |
9 files changed, 88 insertions, 9 deletions
diff --git a/project/scipycon/registration/forms.py b/project/scipycon/registration/forms.py index 8e5c27a..50bfad0 100644 --- a/project/scipycon/registration/forms.py +++ b/project/scipycon/registration/forms.py @@ -33,9 +33,7 @@ class RegistrationSubmitForm(forms.Form): 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', diff --git a/project/scipycon/registration/views.py b/project/scipycon/registration/views.py index ef5f9ee..04d79a3 100644 --- a/project/scipycon/registration/views.py +++ b/project/scipycon/registration/views.py @@ -252,3 +252,26 @@ def submit_registration(request, scope, '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 diff --git a/project/static/css/styles.css b/project/static/css/styles.css index 312290e..4127bd0 100644 --- a/project/static/css/styles.css +++ b/project/static/css/styles.css @@ -113,6 +113,32 @@ table.scipycon-default th 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; diff --git a/project/templates/_menu.html b/project/templates/_menu.html index 7bc94f9..eef3864 100644 --- a/project/templates/_menu.html +++ b/project/templates/_menu.html @@ -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> diff --git a/project/templates/_right_menu.html b/project/templates/_right_menu.html index c75fc2e..bd6b329 100644 --- a/project/templates/_right_menu.html +++ b/project/templates/_right_menu.html @@ -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 diff --git a/project/templates/registration/regstats.html b/project/templates/registration/regstats.html new file mode 100644 index 0000000..e1a0736 --- /dev/null +++ b/project/templates/registration/regstats.html @@ -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 %} diff --git a/project/templates/registration/submit-registration.html b/project/templates/registration/submit-registration.html index c4394a2..a0bea5a 100644 --- a/project/templates/registration/submit-registration.html +++ b/project/templates/registration/submit-registration.html @@ -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 %}"> diff --git a/project/templates/user/account.html b/project/templates/user/account.html index 7c3e87b..774a9b0 100644 --- a/project/templates/user/account.html +++ b/project/templates/user/account.html @@ -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 %} diff --git a/project/urls.py b/project/urls.py index ab2dc87..1a7c33d 100644 --- a/project/urls.py +++ b/project/urls.py @@ -51,6 +51,8 @@ urlpatterns += patterns('project.scipycon.registration.views', '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 |