Skip to content
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

Add plivo gateway. #672

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wieczorek1990
Copy link
Contributor

@wieczorek1990 wieczorek1990 commented Oct 17, 2023

Added Plivo gateway for SMS.

Description

I added a new module in gateways for sending SMS using the phone number module.

Motivation and Context

Plivo is an alternative to Twilio.

How Has This Been Tested?

Manually tested with use of the setup page and read on the SMS debug page of Plivo.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Contributor

@claudep claudep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this code! This still needs documentation on how to configure this gateway.

Moreover, I think you cannot simply change the name of the sms template, as people having overridden the template will suddenly see the default template instead of the custom one. I would suggest adding a list of two templates in render_to_string, so the old path is still used if it exists in user projects.

@wieczorek1990
Copy link
Contributor Author

wieczorek1990 commented Oct 17, 2023 via email

@wieczorek1990
Copy link
Contributor Author

@claudep I do not see a possibility to use two template_name's in render_to_string.

@wieczorek1990
Copy link
Contributor Author

@claudep Added documentation.

@claudep
Copy link
Contributor

claudep commented Oct 17, 2023

@claudep I do not see a possibility to use two template_name's in render_to_string.

From https://docs.djangoproject.com/en/4.2/topics/templates/#django.template.loader.render_to_string, The name of the template to load and render. If it’s a list of template names, Django uses select_template() instead of get_template() to find the template.

@wieczorek1990
Copy link
Contributor Author

wieczorek1990 commented Oct 17, 2023 via email

@wieczorek1990
Copy link
Contributor Author

wieczorek1990 commented Oct 17, 2023 via email

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.

None yet

2 participants