sdi/views.py
branchanoop
changeset 90 1a6e1af98624
parent 88 33200c7d163a
child 92 9f305face605
equal deleted inserted replaced
89:b8fc66038d0d 90:1a6e1af98624
     3 from django.contrib.auth.decorators import login_required
     3 from django.contrib.auth.decorators import login_required
     4 
     4 
     5 from django.contrib.auth import authenticate, login, logout
     5 from django.contrib.auth import authenticate, login, logout
     6 
     6 
     7 from sage_days.sdi.models import Registrant
     7 from sage_days.sdi.models import Registrant
     8 from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm
     8 from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm, UserSelectForm
     9 from sage_days.sdi.events import send_reg_complete_mail, mail_invi
     9 from sage_days.sdi.events import send_reg_complete_mail, mail_invi
    10 from sage_days.settings import APACHE_URL_PREFIX as aup
    10 from sage_days.settings import APACHE_URL_PREFIX as aup
    11 
    11 
    12 def register(request):
    12 def register(request):
    13     """ The user register page.
    13     """ The user register page.
   115 
   115 
   116     matches = Registrant.objects.filter(need_for_python_workshop=True, registrantinfo__status_of_attending_workshop="1")
   116     matches = Registrant.objects.filter(need_for_python_workshop=True, registrantinfo__status_of_attending_workshop="1")
   117     if request.method == "POST":
   117     if request.method == "POST":
   118         pass
   118         pass
   119     else:
   119     else:
   120         return render_to_response("send_workshop_confirm.html", {"matches":matches}) 
   120         form = UserSelectForm(matches)
       
   121         return render_to_response("send_workshop_confirm.html", {"form":form}) 
   121 
   122 
   122 def admin_login(request):
   123 def admin_login(request):
   123     """ basic login.
   124     """ basic login.
   124     """
   125     """
   125 
   126