More robust form rendering in the browsable API by tomchristie · Pull Request #4181 · encode/django-rest-framework (original) (raw)

For custom view where a POST request returns a list of objects,
the browsable API can fail with a TypeError when attempting to render the form.

Broadly, this is because it is attempting to render a single-item serializer, with a list of data.

This pull request implements a more robust fallback when the initial form rendering fails.

Closes #3164.