project/scipycon/registration/views.py
branchpayments
changeset 255 b20d55891709
parent 251 b99607287a52
child 257 e2ff0c70014d
equal deleted inserted replaced
254:7d0bb6e94deb 255:b20d55891709
   300     """View that gives the statistics of registrants.
   300     """View that gives the statistics of registrants.
   301     """
   301     """
   302 
   302 
   303     if not request.user.is_staff:
   303     if not request.user.is_staff:
   304         redirect_to = reverse('scipycon_login', kwargs={'scope': scope})
   304         redirect_to = reverse('scipycon_login', kwargs={'scope': scope})
   305 
   305         return set_message_cookie(
       
   306             redirect_to, msg = u'You must be a staff on this website to '
       
   307             'access this page.')
   306 
   308 
   307     q = Registration.objects.all()
   309     q = Registration.objects.all()
   308     conf_num = q.filter(conference=True).count()
   310     conf_num = q.filter(conference=True).count()
   309     tut_num = q.filter(tutorial=True).count()
   311     tut_num = q.filter(tutorial=True).count()
   310     sprint_num = q.filter(sprint=True).count()
   312     sprint_num = q.filter(sprint=True).count()