【文件属性】:
文件名称:twilio-sms-with-django:Django的Twilio短信服务的简单应用
文件大小:10KB
文件格式:ZIP
更新时间:2021-05-16 09:32:06
Python
Twilio SMS与Django
您需要通过此命令安装twilio lib。
pip install twilio
之后,在您的views.py中调用它
from twilio . rest import Client
# your account sid and auth token
account_sid = 'xxxxxx'
auth_token = 'xxxxxx'
# your twilio phone number and send message number
from_phone = 'xxxxxx'
to_phone = '+8801737388xxx'
client = Client ( account_sid , auth_token )
message = client . messages . create (
to = to_phone ,
【文件预览】:
twilio-sms-with-django-master
----.gitignore(4KB)
----templates()
--------index.html(2KB)
----twilio_message()
--------urls.py(114B)
--------__init__.py(0B)
--------views.py(1KB)
--------models.py(57B)
--------apps.py(102B)
--------admin.py(63B)
--------migrations()
--------tests.py(60B)
----twilio_sms()
--------urls.py(806B)
--------__init__.py(0B)
--------wsgi.py(397B)
--------settings.py(3KB)
----README.md(593B)
----manage.py(542B)