# HG changeset patch # User Amit Sethi # Date 1288726127 -19800 # Node ID 62f1cb02cb88c230a7eba13919315aaf98d7816a # Parent 849c8e8391d51ed916d7353dbcaf3ca1e3bc9bc5# Parent d6b0220e37ab9ff64173a02c4fdca13bfd88d524 Merging heads diff -r 849c8e8391d5 -r 62f1cb02cb88 project/scipycon/registration/forms.py --- 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', diff -r 849c8e8391d5 -r 62f1cb02cb88 project/scipycon/registration/views.py --- 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 diff -r 849c8e8391d5 -r 62f1cb02cb88 project/static/css/styles.css --- 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; diff -r 849c8e8391d5 -r 62f1cb02cb88 project/templates/_menu.html --- 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 @@
  • Publicity
  • Organizers
  • {% if user.is_staff %} -
  • HowTo
  • +
  • Registration Statistics
  • {% endif %} diff -r 849c8e8391d5 -r 62f1cb02cb88 project/templates/_right_menu.html --- 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 @@

    Important dates

    {% endif %} diff -r 849c8e8391d5 -r 62f1cb02cb88 project/urls.py --- 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\d+)/$' % (SCOPE_ARG_PATTERN), 'edit_registration', name='scipycon_edit_registration'), + url(r'^%s/regstats/'% (SCOPE_ARG_PATTERN), + 'regstats', name="scipycon_regstats"), ) # Authentication and Profile