示例#1
0
 def _get_response(self, form_code):
     response = Response(reporters=[],
                         survey_response_id=None,
                         exception=self._get_exception())
     response.success = True
     response.errors = data_sender_not_linked_handler(self.dbm,
                                                      self.request,
                                                      form_code=form_code)
     return response
示例#2
0
 def _appendFailedResponse(self, message, values=None):
     response = Response(reporters=[], survey_response_id=None)
     response.success = False
     response.errors = dict(error=ugettext(message), row=values)
     return response
 def _get_wrong_number_of_question_response(self):
     response = Response(reporters=[], survey_response_id=None)
     response.success = False
     response.errors = get_wrong_number_of_answer_error_message()
     return response