Values entered in the browsable api list view html form are currently cleared on an error. This means that a user would have to re-enter the entirety of what they put in before. Instead, the values should be kept so the user can remedy the incorrect fields and keep what they have already entered.
Steps to reproduce:
Navigate to browsable api list view page.
Enter some values into the html form fields, but leave some empty or invalid.
Post the form.
Error is produced.
This also occurs on detail view even though the form is already prefilled with information.
The text was updated successfully, but these errors were encountered:
First attempt at this. This is just making sure we pass data to the serializers used in get_raw_data_form() and get_rendered_html_form(). As you can see the username is missing from the raw data form and is None in the HTML form because since the serializer has an error serializer.data defaults to serializer.get_initial() which excludes fields with empty values. Ideas on how to proceed are welcomed.