-
-
Notifications
You must be signed in to change notification settings - Fork 57
Sponsorship email logic #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Remove redundant line Co-authored-by: Kanishk Pachauri <[email protected]>
Co-authored-by: Kanishk Pachauri <[email protected]>
Co-authored-by: Kanishk Pachauri <[email protected]>
Co-authored-by: Kanishk Pachauri <[email protected]>
Co-authored-by: Kanishk Pachauri <[email protected]>
Co-authored-by: Mariatta <[email protected]>
Co-authored-by: Mariatta <[email protected]>
Co-authored-by: Mariatta <[email protected]>
Co-authored-by: Mariatta <[email protected]>
Co-authored-by: Mariatta <[email protected]>
Co-authored-by: Mariatta <[email protected]>
Co-authored-by: Mariatta <[email protected]>
👷 Deploy request for pyladiescon-portal-docs pending review.Visit the deploys page to approve it
|
|
|
||
| from .models import SponsorshipProfile | ||
|
|
||
| def _send_email(subject, recipient_list, *, html_template=None, text_template=None, context=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
USe the _send_email that's already implemented in volunteer/models.py instead of creating a new one.
Perhaps refactor and move it out of the volunteer/models.py into a more common utils.py that is used by both sponsorships and volunteers
| if created: | ||
| # Email on submission | ||
| subject = f"{settings.ACCOUNT_EMAIL_SUBJECT_PREFIX} Sponsorship Application Received" | ||
| _send_email( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is calling the internal _send_email() function. Should it call either the send_sponsorship_profile_email or send_sponsorship_status_emails?
|
Thanks for the PR. I think this includes changes from your first PR. You will need to update your branch, and pull the new changes from the I've left some comments for improvements. Additionally we need to have unit tests as well. |
|
Closing, duplicate of #213 |
This PR adds backend logic to send automated email notifications when:
A new sponsorship profile is submitted.
A sponsorship application status is updated to "approved" via the Django admin.
Internal team members are notified of new sponsorship submissions and approvals.
Fix #12
Fix #17