diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-09-28 20:10:22 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-09-28 20:33:05 +0200 |
| commit | 6c2faaceb0482267cec19da0ff432984028f9d0c (patch) | |
| tree | 5d62d1d3e058282c5bc7aa4c416c3b458f10d76c /django/contrib/comments | |
| parent | 1cd6e04cd4f768bcd4385b75de433d497d938f82 (diff) | |
Made more extensive use of get_current_site
Refs #15089
Diffstat (limited to 'django/contrib/comments')
| -rw-r--r-- | django/contrib/comments/moderation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/comments/moderation.py b/django/contrib/comments/moderation.py index 9b206a5bad..6c56d7a8a5 100644 --- a/django/contrib/comments/moderation.py +++ b/django/contrib/comments/moderation.py @@ -62,7 +62,7 @@ from django.contrib.comments import signals from django.db.models.base import ModelBase from django.template import Context, loader from django.contrib import comments -from django.contrib.sites.models import Site +from django.contrib.sites.models import get_current_site from django.utils import timezone class AlreadyModerated(Exception): @@ -240,7 +240,7 @@ class CommentModerator(object): t = loader.get_template('comments/comment_notification_email.txt') c = Context({ 'comment': comment, 'content_object': content_object }) - subject = '[%s] New comment posted on "%s"' % (Site.objects.get_current().name, + subject = '[%s] New comment posted on "%s"' % (get_current_site(request).name, content_object) message = t.render(c) send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, recipient_list, fail_silently=True) |
