created the POST part of view. hav to implement the sending email part anoop
authornishanth
Wed, 21 Jul 2010 17:23:57 +0530
branchanoop
changeset 156 cebb6ffb5f83
parent 155 c688c24392bf
child 157 6f7faa7af9d6
created the POST part of view. hav to implement the sending email part
sdi/views.py
--- a/sdi/views.py	Wed Jul 21 17:19:41 2010 +0530
+++ b/sdi/views.py	Wed Jul 21 17:23:57 2010 +0530
@@ -178,7 +178,13 @@
     form = UserSelectForm(user_choices, request.POST)
 
     if request.method == "POST" and form.is_valid():
-        pass
+        selected_users = form.cleaned_data['selected_users']
+        for user in selected_users:
+            user_info = user.registrantinfo_set.all()[0]
+            user_info.status_of_attending_sagedays = "2"
+            user_info.save()
+        
+        return render_to_response("sent_sgd_confirm.html", {"selected_users":selected_users})
     else:
         return render_to_response("send_acco_cnf.html", {"rejected": rejected_ppl,
                                                         "selected_not_confirmed":selected_not_confirmed_ppl,