[Django] #20705: Set email field for PasswordResetForm

15 views
Skip to first unread message

Django

unread,
Jul 4, 2013, 9:16:23 PM7/4/13
to django-...@googlegroups.com
#20705: Set email field for PasswordResetForm
------------------------------+--------------------
Reporter: Cloudream | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------
Like USERNAME_FIELD, add a similar parameter so PasswordResetForm, and
other customized user model functions, do not rely on fixed name email
field to send emails.

--
Ticket URL: <https://code.djangoproject.com/ticket/20705>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 4, 2013, 9:17:02 PM7/4/13
to django-...@googlegroups.com
#20705: Set email field for PasswordResetForm
------------------------------+--------------------------------------

Reporter: Cloudream | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
Changes (by Cloudream):

* cc: Cloudream (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:1>

Django

unread,
Jul 31, 2013, 11:46:35 AM7/31/13
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+------------------------------------

Reporter: Cloudream | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by timo):

* stage: Unreviewed => Accepted


Comment:

Seems like a reasonable request.

--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:2>

Django

unread,
Aug 14, 2013, 2:57:26 AM8/14/13
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+------------------------------------
Reporter: Cloudream | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by susan):

I've been reading this doc for context + background:
https://docs.djangoproject.com/en/1.5/topics/auth/default/#django.contrib.auth.forms.PasswordResetForm

It seems that I'll need to edit the PasswordResetForm class method located
in `contrib.auth.forms`. In particular, L27 might needed to be changed:
"email = forms.EmailField(label=_("Email"), max_length=254)"

Is there an existing similar example that I can follow? I've done a global
search on USERNAME_FIELD, which returned a lot of results; I'm not sure
which are the relevant files to look at.

--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:3>

Django

unread,
Aug 14, 2013, 8:51:16 AM8/14/13
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+------------------------------------
Reporter: Cloudream | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by timo):

This isn't about renaming the form field, but rather not assuming the
"email" field on the `UserModel` is called "email". We could accomplish
this on `PasswordResetForm` by passing in a parameter to the `save` method
with the name of the field, but it would be better to get an idea of the
"other customized user model functions" the OP had in mind to better
determine the feasibility and design of this.

--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:4>

Django

unread,
May 8, 2014, 6:03:35 PM5/8/14
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+------------------------------------
Reporter: Cloudream | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by jorgecarleitao):

* cc: jorgecarleitao (added)


Comment:

Doesn't the ticket #17431 solves this?

--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:5>

Django

unread,
Jul 24, 2015, 10:33:49 AM7/24/15
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+------------------------------------
Reporter: Cloudream | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by timgraham):

No, I think it's still an issue. I'll attach a patch with a sketch of the
code changes.

--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:6>

Django

unread,
Jul 24, 2015, 10:34:01 AM7/24/15
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+------------------------------------
Reporter: Cloudream | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by timgraham):

* Attachment "20705-initial.diff" added.

Django

unread,
Sep 13, 2016, 11:02:05 AM9/13/16
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+------------------------------------
Reporter: Cloudream | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by AleksejManaev):

* cc: AleksejManaev (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:7>

Django

unread,
Sep 13, 2016, 11:02:20 AM9/13/16
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+------------------------------------
Reporter: Cloudream | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by mlevental):

* cc: m.levental@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:8>

Django

unread,
Sep 13, 2016, 11:03:41 AM9/13/16
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+-------------------------------------
Reporter: Cloudream | Owner: mlevental
Type: New feature | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by mlevental):

* owner: nobody => mlevental
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:9>

Django

unread,
Sep 19, 2016, 10:30:24 AM9/19/16
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+-------------------------------------
Reporter: Cloudream | Owner: mlevental
Type: New feature | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1


Comment:

I left some ideas for improvement on the
[https://github.com/django/django/pull/7265 PR].

--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:10>

Django

unread,
Sep 21, 2016, 1:21:12 PM9/21/16
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+-------------------------------------
Reporter: Cloudream | Owner: mlevental
Type: New feature | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by mlevental):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:11>

Django

unread,
Sep 21, 2016, 8:07:48 PM9/21/16
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+-------------------------------------
Reporter: Cloudream | Owner: mlevental
Type: New feature | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:12>

Django

unread,
Sep 27, 2016, 12:01:37 PM9/27/16
to django-...@googlegroups.com
#20705: Allow customizing the email field name for PasswordResetForm
------------------------------+-------------------------------------
Reporter: Cloudream | Owner: mlevental
Type: New feature | Status: closed
Component: contrib.auth | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"617e36dc1ede2a311dfd03f18432b31cbfe4c0f7" 617e36dc]:
{{{
#!CommitTicketReference repository=""
revision="617e36dc1ede2a311dfd03f18432b31cbfe4c0f7"
Fixed #20705 -- Allowed using PasswordResetForm with user models with an
email field not named 'email'.
}}}

Reply all
Reply to author
Forward
0 new messages