rdegges/django-twilio — Issue #7: 500 with @twilio_view decorator
Author: willcadell
Created: 2012-02-24 06:38:16+00:00
State: open

hi there, try as i might i can't get twilio to accept a voice response xml file:

view:

@twilio_view
def publishPin(request, **kwargs):

u = request.user
h = HomeTel.objects.get(user = u)
r = twiml.Response()
intro = "This is an automated message from Place Speak dot com."
prepare = "In a second you will be given an eight digit code, it will be repeated three times."
statement = "Your secret code is %s." % h.pin
finale = "Have a nice day."

r.say(intro)
r.say(prepare)
r.say(statement)
r.pause(length = 1)
r.say(statement)
r.pause(length = 1)
r.say(statement)
r.say(finale)

return r

url:
url(r'^validate/hometel/talk/(?P[\w\.]+)$', 'validate.views.publishPin',),

I'm totally stumped, the call goes in but twilio provides me back with a 500 and indicates a "type error" if i navgate to the page the xml is just fine:

This is an automated message from Place Speak dot com.In a second you will be given an eight digit code, it will be repeated three times.Your secret code is 20218721.Your secret code is 20218721.Your secret code is 20218721.Have a nice day.

all very odd! can you help?