--
Ticket URL: <https://code.djangoproject.com/ticket/20705>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Cloudream (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:1>
* stage: Unreviewed => Accepted
Comment:
Seems like a reasonable request.
--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:2>
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>
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>
* cc: jorgecarleitao (added)
Comment:
Doesn't the ticket #17431 solves this?
--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:5>
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>
* Attachment "20705-initial.diff" added.
* cc: AleksejManaev (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:7>
* cc: m.levental@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:8>
* owner: nobody => mlevental
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:9>
* 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>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:11>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:12>
* 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'.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20705#comment:12>