[Django] #36457: Convert methods .send_mail(), .get_users() from PasswordResetForm and .get_user() from PasswordResetConfirmView into functions.

4 views
Skip to first unread message

Django

unread,
Jun 11, 2025, 10:01:16 PMJun 11
to django-...@googlegroups.com
#36457: Convert methods .send_mail(), .get_users() from PasswordResetForm and
.get_user() from PasswordResetConfirmView into functions.
-------------------------------------+-------------------------------------
Reporter: keter2002 | Type:
| Cleanup/optimization
Status: new | Component:
| contrib.auth
Version: dev | Severity: Normal
Keywords: users, email, | Triage Stage:
PasswordResetForm, | Unreviewed
PasswordResetConfirmView, auth, |
method, id |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
The methods .send_mail(), .get_users() from PasswordResetForm and
.get_user() from PasswordResetConfirmView could be reused in other views
and forms to list all active users with a given e-mail, send a formatted
e-mail, or get a user by their base64 id.
--
Ticket URL: <https://code.djangoproject.com/ticket/36457>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 11, 2025, 10:03:31 PMJun 11
to django-...@googlegroups.com
#36457: Convert methods .send_mail(), .get_users() from PasswordResetForm and
.get_user() from PasswordResetConfirmView into functions.
-------------------------------------+-------------------------------------
Reporter: keter2002 | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: users, email, | Triage Stage:
PasswordResetForm, | Unreviewed
PasswordResetConfirmView, auth, |
method, id |
Has patch: 0 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by keter2002):

* needs_docs: 0 => 1

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

Django

unread,
Jun 12, 2025, 2:46:24 AMJun 12
to django-...@googlegroups.com
#36457: Convert methods .send_mail(), .get_users() from PasswordResetForm and
.get_user() from PasswordResetConfirmView into functions.
-------------------------------------+-------------------------------------
Reporter: keter2002 | Owner: (none)
Type: | Status: closed
Cleanup/optimization |
Component: contrib.auth | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: users, email, | Triage Stage:
PasswordResetForm, | Unreviewed
PasswordResetConfirmView, auth, |
method, id |
Has patch: 0 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* resolution: => wontfix
* status: new => closed

Comment:

As each can be called already doing `PasswordResetForm().send_mail()`, I
personally don't see much reason to refactor here

As this is suggesting a change to the API, you should propose and discuss
this with the community. To do that, please raise this on the
[https://github.com/django/new-features/issues ​new feature tracker].

I'll close the ticket for now, but if the community agrees with the
proposal, please return to this ticket and reference the discussion so we
can re-open it. For more information, please refer to
[https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
features/#requesting-features the documented guidelines for requesting
features].
--
Ticket URL: <https://code.djangoproject.com/ticket/36457#comment:2>
Reply all
Reply to author
Forward
0 new messages