diff options
author | Akshen | 2017-04-07 13:05:52 +0530 |
---|---|---|
committer | Akshen | 2017-05-19 15:30:31 +0530 |
commit | 85b67176a63cc1816a75b607b08f44306736fc35 (patch) | |
tree | c0b36a749511f4fed7a7b4b9a8c0f2e80366d975 /workshop_app/send_mails.py | |
parent | 042fd3efa7bee7505508f30a2e291c11e615da37 (diff) | |
download | workshop_booking-85b67176a63cc1816a75b607b08f44306736fc35.tar.gz workshop_booking-85b67176a63cc1816a75b607b08f44306736fc35.tar.bz2 workshop_booking-85b67176a63cc1816a75b607b08f44306736fc35.zip |
Reject Workshop Added
Instructor can reject workshops
Diffstat (limited to 'workshop_app/send_mails.py')
-rw-r--r-- | workshop_app/send_mails.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/workshop_app/send_mails.py b/workshop_app/send_mails.py index e81168c..afd42ed 100644 --- a/workshop_app/send_mails.py +++ b/workshop_app/send_mails.py @@ -66,6 +66,18 @@ def send_email(request, call_on, message = "Your workshop for "+workshop_date+"request has been confirmed" send_mail("Python Workshop Booking Confirmation", message, EMAIL_HOST_USER, [other_email], fail_silently=False) + + elif call_on == "Booking Request Rejected": + if user_position == "instructor": + message = "You have reject the booking on "+workshop_date+" for "+workshop_title + send_mail("Python Workshop Booking Rejected", message, EMAIL_HOST_USER, + [request.user.email], fail_silently=False) + else: + message = "Your workshop request for "+workshop_date+" has been cancelled please \ + try for some other day." + send_mail("Python Workshop Booking Request Rejected", message, EMAIL_HOST_USER, + [other_email], fail_silently=False) + else: message = "Issue at Workshop Booking App please check" send_mail("Issue At Workshop Booking App", message, EMAIL_HOST_USER, |