Opened 14 years ago
Closed 12 years ago
#14646 closed Bug (wontfix)
django.contrib.comments is missing default template for comment_notification_email.txt, and has no documentation of template context
Reported by: | tpherndon | Owned by: | tzulberti |
---|---|---|---|
Component: | contrib.comments | Version: | dev |
Severity: | Normal | Keywords: | email, template |
Cc: | jefferya@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
When using moderation and having set email_notification to True, posting a comment results in an error complaining that there is no template for 'comments/comment_notification_email.txt'. In addition, there is no mention in the documentation that creating that template is required to use email notifications, nor what context is passed by default into the template (that is, no instructions for what should go in the template).
I would expect that either a default template would be included with Django, or explicit instructions would inform the user that they need to create the template and what would need to go in it.
Attachments (2)
Change History (13)
by , 14 years ago
Attachment: | 14646_comment_notification_email_template_fix.diff added |
---|
comment:1 by , 14 years ago
Owner: | changed from | to
---|
comment:2 by , 14 years ago
Has patch: | set |
---|
comment:3 by , 14 years ago
Owner: | changed from | to
---|
comment:4 by , 14 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
The documentation is ok. I don't kwow about the template (at least, for me it is ok)
by , 14 years ago
Attachment: | 14646_comment_notification_email_template_fix.2.diff added |
---|
A better patch that shows user's name and e-mail even if comment was posted by authenticated user.
comment:5 by , 14 years ago
The attached template for e-mail does not show user name and e-mail if the comment was posted by authenticated user.
I attached a fixed template which shows user's name and e-mail regardless if comment was posted by anonymous or authenticated user.
comment:6 by , 14 years ago
Needs tests: | set |
---|
The template needs to be localized and tests need to be added.
comment:7 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:8 by , 14 years ago
Easy pickings: | unset |
---|---|
UI/UX: | unset |
Slightly dependent on #12018. With a request context, the docs in the patch will have to be updated.
comment:9 by , 13 years ago
Needs tests: | unset |
---|
As for the tests, all that would have to be done is remove the template that is used by the tests: https://github.com/django/django/blob/master/tests/templates/comments/comment_notification_email.txt
The tests currently use that to test the email functionality. If that file is removed, the test breaks. If that file is removed and the new template is checked in to django.contrib.comments, then the test will pass again.
comment:10 by , 13 years ago
Cc: | added |
---|
comment:11 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
django.contrib.comments
has been deprecated and is no longer supported, so I'm closing this ticket. We're encouraging users to transition to a custom solution, or to a hosted solution like Disqus.
The code itself has moved to https://github.com/django/django-contrib-comments; if you want to keep using it, you could move this bug over there.
Adds default comment_notification_email.txt template and updates documentation.