auth.forms.PasswordResetForm.send_email()

send_email(subject_template_name, email_template_name, context, from_email, to_email, html_email_template_name=None)

Uses the arguments to send an EmailMultiAlternatives. Can be overridden to customize how the email is sent to the user.

Parameters:
  • subject_template_name – the template for the subject.
  • email_template_name – the template for the email body.
  • context – context passed to the subject_template, email_template, and html_email_template (if it is not None).
  • from_email – the sender’s email.
  • to_email – the email of the requester.
  • html_email_template_name – the template for the HTML body; defaults to None, in which case a plain text email is sent.

By default, save() populates the context with the same variables that password_reset() passes to its email context.

doc_Django
2016-10-09 18:34:09
Comments
Leave a Comment

Please login to continue.