OK possible noob question here: While learning Django, I thought it might be cool to explore telephony with Twilio. My immediate goal is to create a page with a button that, when clicked, causes a "Hello World" SMS to be sent to my phone. After sorting that out I have some ideas for cooler stuff.
I've completed several Django tutorials so far, and made a few little apps with simple views. But nothing I've learned has particularly shed any light on how to do something like this. I've also investigated (and installed) the Django-Twilio app and the Twilio Python Helper Library, but the docs for neither of these show how to send "hello world" SMS's.
Can anyone point out a resource that might show how to do this? Or, if it's trivially easy, just post some example code?
Edit in response to Kevin Burke:
Thanks for getting back to me, Kevin. After modifying my urls.py to include:
urlpatterns = patterns('',
# ...
url(r'^sms/$', 'django_twilio.views.sms', {
'message': 'Hello world',
'to': '+12223334444',
'sender': '+18882223333',
'status_callback': '/sms/completed/',
}, name = 'send_message'),
# ...
)
and pointing my browser at
http://127.0.0.1:8000/sms/
the following error arises:
Exception Type: TwimlException at /sms/
Exception Value: Invalid method parameter, must be 'GET' or 'POST'
Perhaps this is because I have failed to make appropriate modifications to the view. But I don't have a good way of figuring out what I'm doing wrong from the minimal examples in the tutorial. /Edit