--- a/sdi/views.py Sat Jul 17 02:05:43 2010 +0530
+++ b/sdi/views.py Sat Jul 17 02:16:30 2010 +0530
@@ -17,7 +17,7 @@
if request.method == "POST":
form = RegisterForm(request.POST)
if form.is_valid():
- form.save()
+ user = form.save()
data = form.cleaned_data
first_name = data['first_name']
@@ -25,6 +25,13 @@
email = data['email']
send_reg_complete_mail(email, first_name, last_name)
+ user_info = RegistrantInfo()
+ user_info.registrant = user
+ user_info.status_of_attending_sagedays = "1"
+ user_info.status_of_attending_workshop = True if user.need_for_python_workshop else False
+ user_info.status_of_accomodation = "1" if user.acco_required else "0"
+ user_info.save()
+
return redirect("/sage_days/registration/complete")
else:
return render_to_response("register.html", {"form":form})