views.py
def generate_xml(request, number): caller_id = \'x-x-x-x\' resp = twilio.twiml.Response() with resp.dial(callerId=caller_id) as r:
You can not pass directly str as a django response . You must use
str
django response
from django.http import HttpResponse
if you want to render string data as django view response. have a look here
return HttpResponse(resp)