示例#1
0
 def send_email(self, regenerate=False):
     if not self.verification_code or regenerate:
         self.generate_token()
     context = dict(verification_code=self.verification_code,
                    first_name=self.owner.first_name)
     email(recipient=[self.email],
           context=context,
           template_name='email_verification')
示例#2
0
 def send_email(self, regenerate=False):
     if not self.verification_code or regenerate:
         self.generate_token()
     context = dict(
         verification_code=self.verification_code,
         first_name=self.owner.first_name
     )
     email(
         recipient=[self.email],
         context=context,
         template_name='email_verification'
     )
示例#3
0
    def send_email(self, regenerate=False):
        if not self.verification_code or regenerate:
            self.generate_token()

        context = dict(
            verification_code=self.verification_code,
            first_name=self.owner.first_name,
            accounts_reset_password_link='http://%s%s' %
            (get_current_site().domain,
             reverse_lazy('accounts_reset_password', args=(self.id, ))))
        email(recipient=[self.owner.email],
              context=context,
              template_name='password_reset')
示例#4
0
    def send_email(self, regenerate=False):
        if not self.verification_code or regenerate:
            self.generate_token()

        context = dict(
            verification_code=self.verification_code,
            first_name=self.owner.first_name,
            accounts_reset_password_link='http://%s%s' % (
                get_current_site().domain,
                reverse_lazy('accounts_reset_password', args=(self.id,))
            )
        )
        email(
            recipient=[self.owner.email],
            context=context,
            template_name='password_reset'
        )