--- a/sdi/views.py Wed Jul 14 21:04:59 2010 +0530
+++ b/sdi/views.py Thu Jul 15 01:06:32 2010 +0530
@@ -115,10 +115,14 @@
matches = Registrant.objects.filter(need_for_python_workshop=True, registrantinfo__status_of_attending_workshop="1")
if request.method == "POST":
- pass
+ form = UserSelectForm(matches, request.POST)
+ if form.is_valid():
+ selected_users = form.cleaned_data['selected_users']
+ return render_to_response("sent_wsp_confirm.html", {"selected_users":selected_users})
+ else:
+ return render_to_response("send_workshop_confirm.html", {"matches":matches})
else:
- form = UserSelectForm(matches)
- return render_to_response("send_workshop_confirm.html", {"form":form})
+ return render_to_response("send_workshop_confirm.html", {"matches":matches})
def admin_login(request):
""" basic login.