Skip to content

Send attendance certificate after the conference. #33

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

Open
Mariatta opened this issue Mar 20, 2025 · 3 comments
Open

Send attendance certificate after the conference. #33

Mariatta opened this issue Mar 20, 2025 · 3 comments
Labels
backend backend code changes docs Docs / write up

Comments

@Mariatta
Copy link
Member

After the conference ends, we want to send each attendee their conference attendance certificate.

I have written a blog post on how to create a script for doing this. We need to adapt it to be sent through the web portal instead of as a script on my computer.

Differences from the blog post:

  • We use the Django send_email function instead of using GMail API
  • Instead of a Python script, create a Django Management Command
  • Either invoke it manually using Django Shell, or schedule it as a scheduled task/cron job

Other details:

  • Check with conference chair about the GSlide template to be used (if it is different from last year)
  • Get the GSlide id
  • Get the list of volunteers from the pyladiescon portal's database: They should receive the volunteer certificate instead of the attendee certificate
@Mariatta Mariatta added the backend backend code changes label Mar 20, 2025
@Mariatta Mariatta added this to the Post conference milestone Mar 20, 2025
@Mariatta Mariatta added the docs Docs / write up label Mar 20, 2025
@VanshikaSharma369
Copy link

This can be implemented effectively using Django's management commands and Google Slides API.

Solution Approach

  1. Django Management Command
    Create a Django management command (send_certificates.py) that:
    Fetches the attendee and volunteer lists from the database.
    Determines the appropriate certificate (attendee vs. volunteer).
    Uses the Google Slides API to create a certificate with dynamic name insertion.
    Sends the certificate via Django’s send_mail function.

  2. Google Slides API Integration
    Retrieve the GSlide template ID.
    Use the Google Slides API to duplicate the slide for each recipient.
    Replace placeholders (like {{name}}) with attendee/volunteer names.
    Export the slide as a PDF and attach it to the email.

  3. Email Sending with Django
    Configure Django’s EMAIL_BACKEND (SMTP or other email services).
    Attach the generated PDF certificate and send the email.

  4. Running the Command
    Manually: python manage.py send_certificates

@Pradhvan
Copy link
Contributor

I can take it up 👋🏾

@Mariatta
Copy link
Member Author

Sure perhaps start with thinking /designing how to send the certificate to the volunteer, because right now only the volunteer profile model is available.

You can start trying by creating your own Google slides as the base template and creating your own Google API credentials.

Other idea, in terms of user experience:

  • also upload the certificate to their user profile, in addition to sending them an email attachment. eg when they login to the portal profile, they can see the certificate from there so they can show it off.
  • add the "share" button from their portal profile page so they can post on social media

I'm open to other ideas as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend backend code changes docs Docs / write up
Projects
None yet
Development

No branches or pull requests

3 participants