sdi/views.py
changeset 24 f79be1dd4a22
parent 23 2aae8293f3a7
child 25 30baf3c635c5
equal deleted inserted replaced
23:2aae8293f3a7 24:f79be1dd4a22
     1 from django.shortcuts import render_to_response, redirect
     1 from django.shortcuts import render_to_response, redirect
     2 
     2 
     3 from sage_days.sdi.models import Registrant
     3 from sage_days.sdi.models import Registrant
     4 from sage_days.sdi.forms import RegisterForm
     4 from sage_days.sdi.forms import RegisterForm, SearchForm
     5 
     5 
     6 def register(request):
     6 def register(request):
     7     """ The user register page.
     7     """ The user register page.
     8     """
     8     """
     9 
     9 
    26 
    26 
    27 def list_stats(request):
    27 def list_stats(request):
    28     """ List the statiscs of registered participants.
    28     """ List the statiscs of registered participants.
    29     """
    29     """
    30 
    30 
    31     return redirect("/registration/complete")
    31     if request.method == "POST":
       
    32         form = SearchForm(request.POST)
       
    33         if form.is_valid():
       
    34             pass
       
    35         else:
       
    36             return render_to_response("list_stats.html", {"form":form})
       
    37     else:
       
    38         form = SearchForm()
       
    39         return render_to_response("list_stats.html", {"form":form})