[Answer]-Nested Serializer in Django Rest Framework API

1πŸ‘

βœ…

I can’t find the exact RFC reference but the limitation here is HTTP.
HTTP forms cannot natively encode nested data structures (both application/x-www-form-urlencoded and multipart/form-data rely on flat key-value formats)

one approach here might be to create a page that uses the browsableapi renderer to render those parts of your form that are possible and then implement your own logic to
– render the nested serializer
– format the form and contents into other language for submission to your end point (e.g. convert the html form and contents to json: Convert form data to JavaScript object with jQuery)

πŸ‘€w–

Leave a comment