diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 1d12b1d92..5c4cba588 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -1387,7 +1387,7 @@ class ListField(Field): if len(val) > 1: # Support QueryDict lists in HTML input. return val - return html.parse_html_list(dictionary, prefix=self.field_name) + return html.parse_json_form(dictionary, prefix=self.field_name) return dictionary.get(self.field_name, empty) def to_internal_value(self, data): @@ -1395,7 +1395,7 @@ class ListField(Field): List of dicts of native values <- List of dicts of primitive datatypes. """ if html.is_html_input(data): - data = html.parse_html_list(data) + data = html.parse_json_form(data) if isinstance(data, type('')) or not hasattr(data, '__iter__'): self.fail('not_a_list', input_type=type(data).__name__) if not self.allow_empty and len(data) == 0: @@ -1426,7 +1426,7 @@ class DictField(Field): # We override the default field access in order to support # dictionaries in HTML forms. if html.is_html_input(dictionary): - return html.parse_html_dict(dictionary, prefix=self.field_name) + return html.parse_json_form(dictionary, prefix=self.field_name) return dictionary.get(self.field_name, empty) def to_internal_value(self, data): @@ -1434,7 +1434,7 @@ class DictField(Field): Dicts of native values <- Dicts of primitive datatypes. """ if html.is_html_input(data): - data = html.parse_html_dict(data) + data = html.parse_json_form(data) if not isinstance(data, dict): self.fail('not_a_dict', input_type=type(data).__name__) return dict([