comparison gpp/accounts/forms.py @ 513:9e7ae8462f3f

Using celery to send mail out of the request/response cycle.
author Brian Neal <bgneal@gmail.com>
date Tue, 13 Dec 2011 02:07:55 +0000
parents b137a0966e4b
children 6a265b5768ca
comparison
equal deleted inserted replaced
512:3fd369e1197f 513:9e7ae8462f3f
142 'username' : pending_user.username, 142 'username' : pending_user.username,
143 'admin_email' : admin_email, 143 'admin_email' : admin_email,
144 }) 144 })
145 145
146 subject = 'Registration Confirmation for ' + site.name 146 subject = 'Registration Confirmation for ' + site.name
147 send_mail(subject, msg, admin_email, [self.cleaned_data['email']], 147 send_mail(subject, msg, admin_email, [self.cleaned_data['email']])
148 expedite=True)
149 logging.info('Accounts/registration conf. email sent to %s for user %s; IP = %s', 148 logging.info('Accounts/registration conf. email sent to %s for user %s; IP = %s',
150 self.cleaned_data['email'], pending_user.username, self.ip) 149 self.cleaned_data['email'], pending_user.username, self.ip)
151 150
152 return pending_user 151 return pending_user
153 152