Skip to content

Commit

Permalink
Notify members when notifications sent
Browse files Browse the repository at this point in the history
  • Loading branch information
rebkwok committed Sep 20, 2024
1 parent 835d481 commit eaeb3e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion studioadmin/views/email_helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.conf import settings
from django.contrib.auth.models import User
from django.core.mail.message import EmailMultiAlternatives
from django.contrib import messages
from django.template.loader import get_template

from booking.models import UserMembership
Expand Down Expand Up @@ -32,4 +33,5 @@ def send_new_classes_email_to_members(request, new_classes):
"text/html"
)
msg.send(fail_silently=False)

if members:
messages.success(request, f"{len(members)} have been notified by email")

0 comments on commit eaeb3e1

Please sign in to comment.