sdi/views.py
branchanoop
changeset 117 af9472ab8f3e
parent 116 54ced1b9e010
child 118 6c3602582f9f
equal deleted inserted replaced
116:54ced1b9e010 117:af9472ab8f3e
   138     form = UserSelectForm(user_choices, request.POST)
   138     form = UserSelectForm(user_choices, request.POST)
   139 
   139 
   140     if request.method == "POST" and form.is_valid():
   140     if request.method == "POST" and form.is_valid():
   141         selected_users = form.cleaned_data['selected_users']
   141         selected_users = form.cleaned_data['selected_users']
   142         for user in selected_users:
   142         for user in selected_users:
   143             user_info = user.registrantinfo.all()[0]
   143             user_info = user.registrantinfo_set.all()[0]
   144             user_info.status_of_attending_sagedays = "2"
   144             user_info.status_of_attending_sagedays = "2"
   145             user_info.save()
   145             user_info.save()
   146         
   146         
   147         return render_to_response("sent_sgd_confirm.html", {"selected_users":selected_users})
   147         return render_to_response("sent_sgd_confirm.html", {"selected_users":selected_users})
   148     else:
   148     else: