How to deal with nested serializers and form data

38 views
Skip to first unread message

C G

unread,
Oct 27, 2020, 7:50:39 PM10/27/20
to Django REST framework
Hello, i have a question regarding writable nested serializers, i have two models that are related through a OneToOne relationship, when i try to serialize the data from the request (which is in 'form-data' format because it contains an Image file) it fails, i overrided the 'create' method as the official docs says but i am still not able to accomplish the creation of the objects in the DB.

I've found this thread in Stackoverflow that says that handling writable nested serializers using form-data format is not supported.

Thanks a lot in advance.

Carl Nobile

unread,
Oct 27, 2020, 8:44:02 PM10/27/20
to django-res...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/649a1a7f-a4e0-472d-b238-e5b5e364aa4cn%40googlegroups.com.


--
-------------------------------------------------------------------------------
Carl J. Nobile (Software Engineer)
carl....@gmail.com
-------------------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages