sdi/views.py
branchanoop
changeset 92 9f305face605
parent 91 9fab907060a7
parent 90 1a6e1af98624
child 93 505989755cd8
--- a/sdi/views.py	Wed Jul 14 21:04:12 2010 +0530
+++ b/sdi/views.py	Wed Jul 14 21:04:59 2010 +0530
@@ -5,7 +5,7 @@
 from django.contrib.auth import authenticate, login, logout
 
 from sage_days.sdi.models import Registrant
-from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm
+from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm, UserSelectForm
 from sage_days.sdi.events import send_reg_complete_mail, mail_invi
 from sage_days.settings import APACHE_URL_PREFIX as aup
 
@@ -107,6 +107,19 @@
         form = EmailForm()
         return render_to_response("send_invi.html", {"form":form})
 
+@login_required
+def send_workshop_confirm(request):
+    """ Show a list of all the ppl who requested for a workshop and 
+    send a confirmation mail to them if not sent.
+    """
+
+    matches = Registrant.objects.filter(need_for_python_workshop=True, registrantinfo__status_of_attending_workshop="1")
+    if request.method == "POST":
+        pass
+    else:
+        form = UserSelectForm(matches)
+        return render_to_response("send_workshop_confirm.html", {"form":form}) 
+
 def admin_login(request):
     """ basic login.
     """