Handling the password in mail problem
authoramit
Sat, 30 Oct 2010 03:33:09 +0530
changeset 186 8bd09b59f359
parent 179 851b3fe8f30c
child 187 49b1ec16f6ab
Handling the password in mail problem
project/scipycon/registration/utils.py
project/scipycon/registration/views.py
--- a/project/scipycon/registration/utils.py	Fri Oct 29 15:37:13 2010 +0530
+++ b/project/scipycon/registration/utils.py	Sat Oct 30 03:33:09 2010 +0530
@@ -1,7 +1,7 @@
 from django.core.mail import EmailMessage
 
 
-def send_confirmation(registrant, event):
+def send_confirmation(registrant, event ,password=None):
 
     message = EmailMessage()
     message.subject = u'Registration to %s' % (event.get_full_name())
@@ -10,7 +10,7 @@
 
     details = {'name': registrant.get_full_name(),
                'username': registrant.username,
-               'password': registrant.password,
+               'password': password,
                'event_name': event.get_full_name(),
                'event_scope': event.scope,
             }
--- a/project/scipycon/registration/views.py	Fri Oct 29 15:37:13 2010 +0530
+++ b/project/scipycon/registration/views.py	Sat Oct 30 03:33:09 2010 +0530
@@ -227,7 +227,7 @@
 
             wifi = wifi_form.save(registrant, scope_entity)
 
-            send_confirmation(registrant, scope_entity)
+            send_confirmation(registrant, scope_entity,password=passwd)
 
             redirect_to = reverse('scipycon_registrations',
                                   kwargs={'scope': scope})