Add a Send SMS View

Add a view that renders a Jinja2 template for the web application. Create this template at templates/index.html:

The following HTML includes the Bootstrap CSS framework and then renders a form with two fields: to_number for taking the destination phone number and message, so the user can enter their SMS message.

How to Send SMS Messages with Python, Flask and Nexmo

This tutorial introduces you to sending SMS with Python, making use of the Nexmo Python library. It starts by showing how to send SMS from the REPL, then goes on to show you how to build a simple flask app with SMS capabilities.

手順
1
Introduction to this tutorial
2
Prerequisites
3
Install the Vonage Python Server SDK
4
Send an SMS from the Python REPL
5
Set up an SMS Sending Flask App
6
Add a Send SMS View
7
Run the Flask Server
8
Handle the Form Post
9
What's next?