Fixed #20832 -- Enabled HTML password reset email

Added optional html_email_template_name parameter to password_reset view
and PasswordResetForm.
This commit is contained in:
Justin Michalicek 2013-07-30 22:29:34 -04:00 committed by Tim Graham
parent 94d7fed775
commit 6d88d47be6
9 changed files with 100 additions and 4 deletions

View file

@ -118,6 +118,10 @@ Minor features
customize the value of :attr:`ModelAdmin.fields
<django.contrib.admin.ModelAdmin.fields>`.
* :func:`django.contrib.auth.views.password_reset` takes an optional
``html_email_template_name`` parameter used to send a multipart HTML email
for password resets.
Backwards incompatible changes in 1.7
=====================================

View file

@ -793,7 +793,7 @@ patterns.
* ``extra_context``: A dictionary of context data that will be added to the
default context data passed to the template.
.. function:: password_reset(request[, is_admin_site, template_name, email_template_name, password_reset_form, token_generator, post_reset_redirect, from_email, current_app, extra_context])
.. function:: password_reset(request[, is_admin_site, template_name, email_template_name, password_reset_form, token_generator, post_reset_redirect, from_email, current_app, extra_context, html_email_template_name])
Allows a user to reset their password by generating a one-time use link
that can be used to reset the password, and sending that link to the
@ -856,6 +856,14 @@ patterns.
* ``extra_context``: A dictionary of context data that will be added to the
default context data passed to the template.
* ``html_email_template_name``: The full name of a template to use
for generating a ``text/html`` multipart email with the password reset
link. By default, HTML email is not sent.
.. versionadded:: 1.7
``html_email_template_name`` was added.
**Template context:**
* ``form``: The form (see ``password_reset_form`` above) for resetting