Opened 15 years ago
Closed 14 years ago
#12202 closed New feature (fixed)
Hardcoded subject in the reset password mail
Reported by: | anonymous | Owned by: | Austin Gabel |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Normal | Keywords: | reset password mail |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The subject of the mail which will be sent after a user wants to reset his password should be customizeable as well in the appropriate template. See django-registration (activation_email.txt, activation_email_subject.txt).
Attachments (3)
Change History (17)
comment:1 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 15 years ago
Component: | Authentication → django.contrib.admin |
---|---|
milestone: | → 1.2 |
Needs documentation: | set |
Needs tests: | set |
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 15 years ago
Component: | django.contrib.admin → Authentication |
---|
comment:4 by , 15 years ago
I believe using a template for the subject is the correct way to go here. An argument would have to be something like 'subject=None' which seems confusing to me since there is a default subject line.
comment:5 by , 15 years ago
I'd suggest bringing it up in the django-dev group. Not sure we have a precedent set for this.
by , 15 years ago
Attachment: | reset_password.diff added |
---|
Attached the wrong patch before. I will be bringing up this patch to django-dev shortly.
comment:6 by , 15 years ago
Has patch: | set |
---|---|
Triage Stage: | Accepted → Design decision needed |
comment:8 by , 15 years ago
milestone: | → 1.3 |
---|
comment:9 by , 14 years ago
Triage Stage: | Design decision needed → Accepted |
---|---|
Version: | 1.1 → SVN |
This seems sane to me. I don't know if a template, or a passed in string is the correct answer, but I think the fact that it shouldn't be hard coded is pretty clear. Going to change this back to accepted for now.
For this to get into trunk though, it will require docs & tests though.
comment:10 by , 14 years ago
Yes, templates are the way to go here. Please use *.txt file extensions for them though, since the emails are clearly not HTML.
comment:11 by , 14 years ago
Needs tests: | unset |
---|
Here are some progress on this ticket (updated patch with test).
About the .txt extension for the template, I fear that the standard makemessages will not parse it for extracting the translatable content.
For docs, it appears that the registration forms API is not detailed in the documentation (http://docs.djangoproject.com/en/1.2/topics/auth/#module-django.contrib.auth.forms). However, this raises the fact that the password_reset view might also receive a subject_template_name parameter. Is this wanted?
by , 14 years ago
Attachment: | 12202.1.diff added |
---|
Claude patch plus update of makmessages command and reset_password() view
comment:12 by , 14 years ago
milestone: | 1.3 |
---|---|
Severity: | → Normal |
Type: | → New feature |
This shouldn't be hardcoded (the actual solution, be it the proposed solution of separate template for the subject or alternatively just an argument in the view & form is up for debate).