[Django] #34862: For clarity, the `password_reset_email.html` template should have `.txt` extension

27 views
Skip to first unread message

Django

unread,
Sep 21, 2023, 7:58:49 PM9/21/23
to django-...@googlegroups.com
#34862: For clarity, the `password_reset_email.html` template should have `.txt`
extension
------------------------------------------+------------------------
Reporter: Curtis Maloney | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 4.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
The plain text body of a PasswordResetView email currently uses a `.html`
extension.

The general guide on file extensions for templates is to hint at their
content type, and this recently confused a coworker into thinking it was
the HTML body of the email.

A possible transition solution would be to default to a list, since
`render_to_string` already supports finding first match.

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

Django

unread,
Sep 22, 2023, 12:05:04 AM9/22/23
to django-...@googlegroups.com
#34862: For clarity, the `password_reset_email.html` template should have `.txt`
extension
--------------------------------+------------------------------------

Reporter: Curtis Maloney | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 4.2
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 David Sanders):

* stage: Unreviewed => Accepted


Comment:

Thanks FunkyBob 👍

This is consistent with other text based templates.

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

Django

unread,
Sep 22, 2023, 12:08:22 AM9/22/23
to django-...@googlegroups.com
#34862: For clarity, the `password_reset_email.html` template should have `.txt`
extension
--------------------------------------+------------------------------------

Reporter: Curtis Maloney | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: contrib.auth | Version: 4.2
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 David Sanders):

* type: Bug => Cleanup/optimization


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

Django

unread,
Sep 22, 2023, 12:39:07 AM9/22/23
to django-...@googlegroups.com
#34862: For clarity, the `password_reset_email.html` template should have `.txt`
extension
-------------------------------------+-------------------------------------
Reporter: Curtis Maloney | Owner: David
Type: | Sanders
Cleanup/optimization | Status: assigned

Component: contrib.auth | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

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

* owner: nobody => David Sanders
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* status: new => assigned
* needs_docs: 0 => 1


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

Django

unread,
Sep 22, 2023, 1:59:26 AM9/22/23
to django-...@googlegroups.com
#34862: For clarity, the `password_reset_email.html` template should have `.txt`
extension
-------------------------------------+-------------------------------------
Reporter: Curtis Maloney | Owner: David
Type: | Sanders
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: 4.2
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 David Sanders):

* needs_better_patch: 1 => 0
* needs_docs: 1 => 0


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

Django

unread,
Sep 22, 2023, 2:08:09 AM9/22/23
to django-...@googlegroups.com
#34862: For clarity, the `password_reset_email.html` template should have `.txt`
extension
-------------------------------------+-------------------------------------
Reporter: Curtis Maloney | Owner: David
Type: | Sanders
Cleanup/optimization | Status: closed
Component: contrib.auth | Version: 4.2
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage:
| Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => closed
* resolution: => duplicate
* stage: Accepted => Unreviewed


Comment:

Duplicate of #30837.

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

Reply all
Reply to author
Forward
0 new messages