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)

14646_comment_notification_email_template_fix.diff (1.5 KB ) - added by tpherndon 14 years ago.
Adds default comment_notification_email.txt template and updates documentation.
14646_comment_notification_email_template_fix.2.diff (1.5 KB ) - added by fest 14 years ago.
A better patch that shows user's name and e-mail even if comment was posted by authenticated user.

Download all attachments as: .zip

Change History (13)

by tpherndon, 14 years ago

Adds default comment_notification_email.txt template and updates documentation.

comment:1 by tpherndon, 14 years ago

Owner: changed from nobody to tpherndon

comment:2 by tpherndon, 14 years ago

Has patch: set

comment:3 by tzulberti, 14 years ago

Owner: changed from tpherndon to tzulberti

comment:4 by tzulberti, 14 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

The documentation is ok. I don't kwow about the template (at least, for me it is ok)

by fest, 14 years ago

A better patch that shows user's name and e-mail even if comment was posted by authenticated user.

comment:5 by fest, 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 Julien Phalip, 14 years ago

Needs tests: set

The template needs to be localized and tests need to be added.

comment:7 by James Addison, 14 years ago

Severity: Normal
Type: Bug

comment:8 by Thejaswi Puthraya, 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 Jeff Anderson, 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 Jeff Anderson, 13 years ago

Cc: jefferya@… added

comment:11 by Jacob, 12 years ago

Resolution: wontfix
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top