UPD: added app to submit participant registrations.

This commit is contained in:
2019-02-08 16:44:53 +01:00
parent b3abadf2a8
commit f1a97c66a0
49 changed files with 1156 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
from django.dispatch import Signal
from . import emails
registration_created = Signal(providing_args=['registration'])
def send_emails_on_registration(sender, **kwargs):
registration = kwargs.get('registration')
# Inform the event owner (trainer)
recipient = registration.event.owner
email = emails.InformTrainerRegistrationMail(recipient=recipient, registration=registration)
email.send()
# Inform the potential participant
recipient = u'"{fullname}" <{email}>'.format(fullname=registration.get_full_name(),
email=registration.email_address)
email = emails.InformSelfRegistrationMail(recipient=recipient, registration=registration)
email.send()