Commit fbd75ae0 by Juan Diego Caballero

Subject changed to a translated string, notification email changed to @example.com

parent c13d97de
......@@ -8,8 +8,9 @@ from django.contrib.sites.models import Site
from django.core import mail
from django.core.management.base import BaseCommand, CommandError
from django.template.loader import render_to_string
from django.utils.translation import ugettext as _
from django_notify import models
from django_notify.settings import INTERVALS, DEFAULT_EMAIL,NOTIFY_SLEEP_TIME
from django_notify.settings import INTERVALS, DEFAULT_EMAIL,NOTIFY_SLEEP_TIME,EMAIL_SUBJECT
class Command(BaseCommand):
......@@ -24,9 +25,7 @@ class Command(BaseCommand):
def _send_user_notifications(self,context,connection):
subject = render_to_string('emails/notification_email_subject.txt',
context)
subject = ''.join(subject.splitlines())
subject = _(EMAIL_SUBJECT)
message = render_to_string('emails/notification_email_message.txt',
context)
email = mail.EmailMessage(subject, message, DEFAULT_EMAIL,
......
......@@ -18,8 +18,9 @@ ENABLE_ADMIN = getattr(django_settings, "NOTIFY_ENABLE_ADMIN", False)
# to a proper SMTP server, just leave it off...
SEND_EMAILS = getattr(django_settings, "NOTIFY_SEND_EMAILS", False)
DEFAULT_EMAIL = 'notifications@django-wiki.org'
EMAIL_SUBJECT = "Notifications"
DEFAULT_EMAIL = 'notifications@example.com'
#NOTIFY_SLEEP_TIME must be greater than 0 to allow for Garbage Collection
NOTIFY_SLEEP_TIME = 10
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment