--
Ticket URL: <https://code.djangoproject.com/ticket/17431>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/17431#comment:1>
Comment (by anonymous):
My need is to include an additional variable in the context that is used
to render the email template. I don't see that the patch provided supports
that use case?
--
Ticket URL: <https://code.djangoproject.com/ticket/17431#comment:2>
Comment (by ejucovy):
Replying to [comment:2 anonymous]:
> My need is to include an additional variable in the context that is used
to render the email template. I don't see that the patch provided supports
that use case?
Where will your extra context variable be coming from?
If it's something that you can derive without access to a request, then
you can just inject it into the context in your overridden
`construct_email` method. Likewise if it's something derived from
`request.POST` then `self.data` will contain the full POSTed form, and you
can inject your needed variable in `construct_email`.
--
Ticket URL: <https://code.djangoproject.com/ticket/17431#comment:3>
Comment (by aaugustin):
#12684 was a duplicate.
--
Ticket URL: <https://code.djangoproject.com/ticket/17431#comment:4>
Comment (by revolunet):
Thanks ejucovy
+1 on this;
we definitely need to have full control on the sent email template and
context.
--
Ticket URL: <https://code.djangoproject.com/ticket/17431#comment:5>
* cc: timograham@… (added)
* needs_better_patch: 0 => 1
Comment:
Patch needs to be updated to apply cleanly.
--
Ticket URL: <https://code.djangoproject.com/ticket/17431#comment:6>
* owner: nobody => jorgecarleitao
* cc: jorgecarleitao (added)
* status: new => assigned
Comment:
Pull request https://github.com/django/django/pull/2642
--
Ticket URL: <https://code.djangoproject.com/ticket/17431#comment:7>
* needs_docs: 0 => 1
* needs_better_patch: 1 => 0
Comment:
The patch is promising. It still needs more docs however (release notes
and also the `construct_email` method documentation).
--
Ticket URL: <https://code.djangoproject.com/ticket/17431#comment:8>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"a00b78b1e2ac9bf271d55c1799138a27f5e0d03e"]:
{{{
#!CommitTicketReference repository=""
revision="a00b78b1e2ac9bf271d55c1799138a27f5e0d03e"
Fixed #17431 -- Added send_mail() method to PasswordResetForm.
Credits for the initial patch go to ejucovy;
big thanks to Tim Graham for the review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/17431#comment:9>