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)
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)
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)