Send email notifications#17
Conversation
| try: | ||
| current_domain = Site.objects.get_current().domain | ||
| link_to_user_list = f'https://{current_domain}{reverse("user-list")}' | ||
| mail_managers( |
There was a problem hiding this comment.
There is a mail_admin function as well.
I don't have a strong preference. The main difference is one pulls emails from the MANAGERS setting, while the other pulls from the ADMINS setting.
There was a problem hiding this comment.
Since TOMToolkit already has the concept of ADMINS, I'd suggest using that and not introducing a new concept (MANAGERS) unless someone asks for it (even if this idea of ADMINS isn't exactly the same as our current idea of what admins are (i.e. the list of Users with admin priviledge). What actually is the "ADMINS setting" here?).
There was a problem hiding this comment.
I don't really know if we care about the difference.
The ADMINS setting is a list of tuples containing a name and email.
If this is set, those people would receive emails containing the details of all exceptions raised in the request/response cycle.
The MANAGERS Setting is a lit of tuples containing a name and email, same as admin.
If set, those people would receive emails if we were using BrokenLinkEmailsMiddleware.
Does one of those make more sense for us?
I used Managers partially because it doesn't do anything else by default.
| try: | ||
| current_domain = Site.objects.get_current().domain | ||
| link_to_user_list = f'https://{current_domain}{reverse("user-list")}' | ||
| mail_managers( |
There was a problem hiding this comment.
Since TOMToolkit already has the concept of ADMINS, I'd suggest using that and not introducing a new concept (MANAGERS) unless someone asks for it (even if this idea of ADMINS isn't exactly the same as our current idea of what admins are (i.e. the list of Users with admin priviledge). What actually is the "ADMINS setting" here?).
ba962fc
into
7-revisit-and-revamp-tom-registration
Emails are sent to "managers" upon a user registering with the TOM.
Another email is sent to the user upon acceptance.
I don't have a good way to check the default links back to the TOM in the emails work without deploying these changes to tom_demo.