python - How to respond to text message with Django/Twilio -


i set page "example.com/firstsms" send sms through twilio , redirect homepage. if use phone respond message want reply confirmation. of now, nothing happens.

in urls.py have:

(r'^hellomonkey/$', 'crusher.views.hellomonkey'), 

in views.py tried adapt flask example:

def hellomonkey(request):     """respond incoming calls simple text message."""      resp = twilio.twiml.response()     resp.sms("hello, mobile monkey")      return httpresponseredirect(str(resp), content_type="text/plain") 

racking brain! thanks

you returning httpresponseredirect try redirect page , of course doesn't work. should use httpresponse instead:

from django.http import httpresponse  def hellomonkey(request):     """respond incoming calls simple text message."""      resp = twilio.twiml.response()     resp.sms("hello, mobile monkey")      return httpresponse(str(resp)) 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -