コード例 #1
0
ファイル: models.py プロジェクト: randytung/bezzist
 def send_confirmation_email(self):
     Mailer.send_html_mail(
         "Welcome to Bezzist! Please Confirm Your Account",
         "mail/account_confirmation.html",
         {"confirmation_code": self.confirmation_code},
         [self.user.email],
     )
コード例 #2
0
ファイル: models.py プロジェクト: randytung/bezzist
 def confirm_user(self):
     """
     Confirms a user, authenticates and logges her in,
     and then send out an email to that user notifying
     her of the confirmation.
     """
     self.user.is_active = True
     self.user.save()
     Mailer.send_html_mail("Bezzist Account Confimation Email", "mail/account_confirmed.html", {}, [self.user.email])
     self.delete()