示例#1
0
 def __init__(self, form, use_extjshacks):
     error = self._create_error_msg_from_form(form)
     error = extjswrap(error, use_extjshacks, success=False)
     super(FormErrorSerializableResult, self).__init__(error, httpresponsecls=HttpResponseBadRequest)
示例#2
0
 def __init__(self, list_of_forms, use_extjshacks):
     list_of_errors = [self._create_error_msg_from_form(form) for form in list_of_forms]
     errors = extjswrap(list_of_errors, use_extjshacks, success=False)
     super(FormErrorSerializableResult, self).__init__(errors, httpresponsecls=HttpResponseBadRequest)
示例#3
0
 def __init__(self, form, use_extjshacks):
     fielderrors = dict(form.errors)
     non_field_errors = list(form.non_field_errors())
     result = dict(fielderrors=fielderrors, errormessages=non_field_errors)
     result = extjswrap(result, use_extjshacks, success=False)
     super(FormErrorSerializableResult, self).__init__(result, httpresponsecls=HttpResponseBadRequest)