Fixed #11400 -- Passed kwargs from AbstractUser.email_user() to send_mail()

Thanks Jug_ for suggestion, john_scott for the initial patch,
and Tim Graham for code review.
This commit is contained in:
SusanTan 2013-08-10 01:13:41 -07:00 committed by Tim Graham
parent 4eeb8ec147
commit 71c491972e
5 changed files with 38 additions and 4 deletions

View file

@ -215,11 +215,16 @@ Methods
(the Django app label). If the user is inactive, this method will
always return ``False``.
.. method:: email_user(subject, message, from_email=None)
.. method:: email_user(subject, message, from_email=None, **kwargs)
Sends an email to the user. If ``from_email`` is ``None``, Django uses
the :setting:`DEFAULT_FROM_EMAIL`.
.. versionchanged:: 1.7
Any ``**kwargs`` are passed to the underlying
:meth:`~django.core.mail.send_mail()` call.
Manager methods
---------------

View file

@ -152,6 +152,10 @@ Minor features
Each radio button or checkbox includes an ``id_for_label`` attribute to
output the element's ID.
* Any ``**kwargs`` passed to
:meth:`~django.contrib.auth.models.User.email_user()` are passed to the
underlying :meth:`~django.core.mail.send_mail()` call.
Backwards incompatible changes in 1.7
=====================================