diff --git a/circle/circle/settings/base.py b/circle/circle/settings/base.py index 59811c0..c1076cc 100644 --- a/circle/circle/settings/base.py +++ b/circle/circle/settings/base.py @@ -79,6 +79,8 @@ ADMINS = ( ('Root', 'root@localhost'), ) +EMAIL_SUBJECT_PREFIX = get_env_variable('DJANGO_SUBJECT_PREFIX', '[CIRCLE] ') + # See: https://docs.djangoproject.com/en/dev/ref/settings/#managers MANAGERS = ADMINS ########## END MANAGER CONFIGURATION diff --git a/circle/dashboard/models.py b/circle/dashboard/models.py index 778b5bb..2c8856b 100644 --- a/circle/dashboard/models.py +++ b/circle/dashboard/models.py @@ -86,7 +86,7 @@ class Profile(Model): use_gravatar = BooleanField(default=False) email_notifications = BooleanField( verbose_name=_("Email notifications"), default=True, - help_text=_('Wether user wants to get digested email notifications.')) + help_text=_('Whether user wants to get digested email notifications.')) def notify(self, subject, template, context={}, valid_until=None): return Notification.send(self.user, subject, template, context, diff --git a/circle/dashboard/tasks/local_periodic_tasks.py b/circle/dashboard/tasks/local_periodic_tasks.py index ec2b88c..1a5f6ce 100644 --- a/circle/dashboard/tasks/local_periodic_tasks.py +++ b/circle/dashboard/tasks/local_periodic_tasks.py @@ -51,8 +51,9 @@ def send_email_notifications(): 'url': (settings.DJANGO_URL.rstrip("/") + reverse("dashboard.views.notifications")), 'site': settings.COMPANY_NAME} - subject = ungettext("%d new notification", - "%d new notifications", len(msgs)) % len(msgs) + subject = settings.EMAIL_SUBJECT_PREFIX + ungettext( + "%d new notification", + "%d new notifications", len(msgs)) % len(msgs) body = render_to_string('dashboard/notifications/email.txt', context) try: