Commit 2ec4af8b authored by jocelyn's avatar jocelyn

Enhance NOTIFICATION_EMAILS setting

- rename to SUBSCRIPTIONS_NOTIFICATION_EMAILS
- clarify doc
- use a list in any case (instead of None)
parent d651391d
......@@ -384,7 +384,8 @@ MEMBERSHIP_FEE_REMINDER_DATES = [
- `SITE_TITLE`: the base of site title (displayed in browser window/tab title)
- `SITE_HEADER`: the site header (displayed in all pages as page header)
- `SITE_LOGO_URL`: URL to website logo (by default, this is an ascii-duck)
- `NOTIFICATION_EMAILS` : Emails on which to send notifications.
- `SUBSCRIPTIONS_NOTIFICATION_EMAILS` : Emails on which to send notifications
uppon new registration.
Accounting logs
---------------
......
......@@ -69,10 +69,10 @@ def send_registration_notification(sender, user, request=None, **kwargs):
"""
relative_link = reverse('admin:members_member_change', args=[user.id])
edit_link = request.build_absolute_uri(relative_link)
if settings.NOTIFICATION_EMAILS is not None:
if settings.SUBSCRIPTIONS_NOTIFICATION_EMAILS:
utils.send_templated_email(
to=settings.NOTIFICATION_EMAILS,
subject_template='members/emails/new_member_subject.txt',
to=settings.SUBSCRIPTIONS_NOTIFICATION_EMAILS,
body_template='members/emails/new_member_email.html',
context={'member': user, 'edit_link': edit_link},
**kwargs)
......
......@@ -17,7 +17,7 @@ ADMINS = (
)
# Email on which to send emails
NOTIFICATION_EMAILS = None
SUBSCRIPTIONS_NOTIFICATION_EMAILS = []
MANAGERS = ADMINS
......
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