used the form and event in the view anoop
authornishanth
Mon, 26 Jul 2010 18:06:05 +0530
branchanoop
changeset 179 ac558619d49d
parent 178 f87248c912b4
child 180 cf9d1af48d4e
used the form and event in the view
sdi/views.py
--- a/sdi/views.py	Mon Jul 26 18:02:24 2010 +0530
+++ b/sdi/views.py	Mon Jul 26 18:06:05 2010 +0530
@@ -6,8 +6,8 @@
 from django.contrib.auth import authenticate, login, logout
 
 from sage_days.sdi.models import Registrant, RegistrantInfo, ParticipantInfo
-from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm, UserSelectForm, ParticipantInfoForm
-from sage_days.sdi.events import send_reg_complete_mail, mail_invi, send_sgd_ptc_confirm, send_cnf_email, send_wsp_ptc_confirm
+from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm, UserSelectForm, ParticipantInfoForm, SendAccoForm
+from sage_days.sdi.events import send_reg_complete_mail, mail_invi, send_sgd_ptc_confirm, send_cnf_email, send_wsp_ptc_confirm, send_acco_confirm
 from sage_days.settings import APACHE_URL_PREFIX as aup
 
 def register(request):
@@ -152,7 +152,7 @@
     not_selected_ppl = Registrant.objects.filter(registrantinfo__status_of_attending_sagedays ="1")
 
     user_choices = list(not_selected_ppl) + list(not_confirmed_ppl)
-    form = UserSelectForm(user_choices, request.POST)
+    form = SendAccoForm(user_choices, request.POST)
 
     if request.method == "POST" and form.is_valid():
         selected_users = form.cleaned_data['selected_users']
@@ -194,6 +194,7 @@
             user_info.save()
 
 	    message = form.cleaned_data['message']
+	    send_acco_confirm(user, message)
         
         return render_to_response("sent_acco_confirm.html", {"selected_users":selected_users})
     else: