sdi/views.py
branchanoop
changeset 107 9fd140628988
parent 106 39b0b9a71778
child 108 9363e5121f9b
equal deleted inserted replaced
106:39b0b9a71778 107:9fd140628988
   151             has_laptop = request.POST['lap_status']
   151             has_laptop = request.POST['lap_status']
   152         except MultiValueDictKeyError:
   152         except MultiValueDictKeyError:
   153             return render_to_response("cnf_wsp_ptc.html", {"user":user})
   153             return render_to_response("cnf_wsp_ptc.html", {"user":user})
   154 
   154 
   155         user_info.status_of_attending_workshop = "3"
   155         user_info.status_of_attending_workshop = "3"
   156         user_info.has_laptop_for_workshop = has_laptop
   156         user_info.has_laptop_for_workshop = True if has_laptop == "True" else False
   157         user_info.save()
   157         user_info.save()
   158 
   158 
   159         return render_to_response("attending_wsp.html")
   159         return render_to_response("attending_wsp.html")
   160     else:
   160     else:
   161         return render_to_response("cnf_wsp_ptc.html", {"user":user})
   161         return render_to_response("cnf_wsp_ptc.html", {"user":user})