Skip to content

Conversation

@lidokogi
Copy link
Contributor

@lidokogi lidokogi commented Jul 25, 2025

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

lidokogi and others added 30 commits March 31, 2025 15:35
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]>
@netlify
Copy link

netlify bot commented Jul 25, 2025

👷 Deploy request for pyladiescon-portal-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 39348d0


from .models import SponsorshipProfile

def _send_email(subject, recipient_list, *, html_template=None, text_template=None, context=None):
Copy link
Member

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(
Copy link
Member

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?

@Mariatta
Copy link
Member

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 main branch. If you're not sure how to get the latest changes and resolve conflict, let us know.

I've left some comments for improvements. Additionally we need to have unit tests as well.

@Mariatta
Copy link
Member

Mariatta commented Oct 3, 2025

Closing, duplicate of #213

@Mariatta Mariatta closed this Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send email whenever sponsorship application status is changed Send confirmation email upon submitting sponsorship application

2 participants