sdi/views.py
branchanoop
changeset 161 c7c5c727a483
parent 160 2f01af211af9
child 162 27dd4494e7b4
equal deleted inserted replaced
160:2f01af211af9 161:c7c5c727a483
   127 
   127 
   128     choices = list(not_selected_ppl) + list(not_confirmed_ppl)
   128     choices = list(not_selected_ppl) + list(not_confirmed_ppl)
   129     form = UserSelectForm(choices, request.POST)
   129     form = UserSelectForm(choices, request.POST)
   130     if request.method == "POST" and form.is_valid():
   130     if request.method == "POST" and form.is_valid():
   131         selected_users = form.cleaned_data['selected_users']
   131         selected_users = form.cleaned_data['selected_users']
   132         for u in selected_users:
   132         for user in selected_users:
   133             user_info = user.registrantinfo_set.all()[0]
   133             user_info = user.registrantinfo_set.all()[0]
   134             user_info.status_of_attending_workshop = "2"
   134             user_info.status_of_attending_workshop = "2"
   135             user_info.save()
   135             user_info.save()
   136 
   136 
   137         return render_to_response("sent_wsp_confirm.html", {"selected_users":selected_users})
   137         return render_to_response("sent_wsp_confirm.html", {"selected_users":selected_users})