Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpAdd NameLoad Call NameLoad Str keyword Dict Str Str NameLoad Str Assign NameStore BinOpAdd NameLoad Call NameLoad Str keyword Dict Str Str Str NameLoad NameLoad Str Assign NameStore BinOpMod BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str BinOpMod Call NameLoad Str Dict Str Str Str Call NameLoad Str Str Call NameLoad Str Str Str Str Call NameLoad Str Str Dict Str Str NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Dict Str Dict Assign NameStore Call AttributeLoad NameLoad attr Str If CompareEq Call AttributeLoad NameLoad attr Str NameLoad body Assign NameStore NameLoad orelse If CompareNotEq Call AttributeLoad NameLoad attr Str NameLoad body Assign NameStore BinOpMod Call NameLoad Str NameLoad If NameLoad body Assign NameStore ListLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad If Call NameLoad NameLoad body AugAssignAdd NameStore NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Dict Str NameLoad Assign NameStore BinOpAdd NameLoad Call NameLoad NameLoad Return Call NameLoad NameLoad keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str attr Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str attr Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad attr TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Return Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If BoolOpOr UnaryOpNot NameLoad UnaryOpNot NameLoad body Return Call NameLoad Dict Str Str NameLoad Call NameLoad Str Assign NameStore ListLoad TupleLoad NameLoad NameLoad Assign NameStore SubscriptLoad Call NameLoad NameLoad NameLoad NameLoad Index Num Return Call NameLoad NameLoad decorator_list
N/A N/A  Twilio SMS gateway

    Supports Receiving and replying SMS from/to Twilio.
    URL must be set to POST method in Twilio.

    See: http://www.twilio.com/docs/api/twiml/sms/twilio_request
         http://www.twilio.com/docs/api/twiml/sms/your_response  N/A datetime dict2xml dict2xml django.http HttpResponse django.core.urlresolvers reverse django.views.decorators.http require_POST django.views.decorators.csrf csrf_exempt django.utils.translation ugettext _ onadata.apps.sms_support.tools SMS_API_ERROR SMS_SUBMISSION_ACCEPTED onadata.apps.sms_support.parser process_incoming_smses autodoc N/A N/A url_root username id_string N/A N/A N/A urla N/A url_root N/A reverse sms_submission_api kwargs N/A username service username twilio N/A urlb N/A url_root N/A reverse sms_submission_form_api kwargs N/A username id_string service username id_string twilio N/A doc N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A <p> N/A N/A _ %(service)s Instructions: N/A service <a href="https://twilio.com">Twilio's SMS Request</a> </p><ol><li> N/A _ Sign in to Twilio.com and go your Application. </li><li> N/A _ Follow instructions to add one of the following URLs, selecting the HTTP POST method: <br /><span class="sms_autodoc_example">%(urla)s <br />%(urlb)s</span><br /> </li></ol><p> N/A _ That's it. Now Send an SMS Formhub submission to your Twilio phone number. It will create a submission on Formhub. </p> N/A urla urlb urla urlb N/A doc N/A get_response N/A N/A data N/A N/A N/A xml_head <?xml version="1.0" encoding="UTF-8" ?> N/A response_dict N/A Response N/A N/A message N/A N/A data get text N/A N/A N/A N/A data get code SMS_API_ERROR N/A N/A message None N/A N/A N/A N/A N/A data get code SMS_SUBMISSION_ACCEPTED N/A N/A message N/A N/A _ [ERROR] %s message N/A message N/A N/A messages N/A message N/A sendouts N/A N/A data get sendouts N/A N/A N/A len sendouts N/A N/A messages sendouts N/A N/A N/A response_dict update N/A Response N/A Sms messages N/A response N/A xml_head N/A dict2xml response_dict N/A N/A HttpResponse response content_type text/xml N/A import_submission N/A N/A request username N/A N/A N/A  Proxy to import_submission_for_form with None as id_string  N/A N/A import_submission_for_form request username None N/A require_POST csrf_exempt import_submission_for_form N/A N/A request username id_string N/A N/A N/A  Retrieve and process submission from SMSSync Request  N/A sms_identity N/A N/A N/A N/A N/A request POST get From strip N/A sms_text N/A N/A N/A N/A N/A request POST get Body strip N/A now_timestamp N/A N/A N/A N/A N/A datetime datetime now strftime %s N/A sent_timestamp N/A N/A N/A N/A N/A request POST get time_created now_timestamp strip N/A N/A N/A sms_time N/A N/A N/A datetime datetime fromtimestamp N/A float sent_timestamp N/A N/A N/A ValueError N/A N/A sms_time N/A N/A N/A datetime datetime now N/A N/A process_message_for_twilio username username sms_identity sms_identity sms_text sms_text sms_time sms_time id_string id_string N/A require_POST csrf_exempt process_message_for_twilio N/A N/A username sms_identity sms_text sms_time id_string N/A N/A N/A  Process a text instance and return in SMSSync expected format  N/A N/A N/A sms_identity N/A sms_text N/A N/A N/A get_response N/A code text SMS_API_ERROR N/A _ `identity` and `message` are both required and must not be empty. N/A incomings N/A N/A sms_identity sms_text N/A response N/A N/A process_incoming_smses username incomings id_string N/A -1 N/A N/A get_response response N/A