def to_native(self, data): """ List of dicts of native values <- List of dicts of primitive datatypes. """ if is_html_input(data): data = parse_html_list(data) return [self.child.validate(item) for item in data]
def get_value(self, dictionary): if is_html_input(dictionary): # HTML forms do not send a `False` value on an empty checkbox, # so we override the default empty value to be False. return dictionary.get(self.field_name, False) return dictionary.get(self.field_name, empty)
def get_value(self, dictionary): # We override the default field access in order to support # lists in HTML forms. if is_html_input(dictionary): return parse_html_list(dictionary, prefix=self.field_name) return dictionary.get(self.field_name, empty)