serialization - How can I write to two different serializers simultaneously in Django 1.8 and REST 3? -
i sending json data angular app django view/serializer , need serialize both arrays @ same time in order create user successfully. tried ridiculous way of separating data in view , doing 2 serializations separately, realized messy , become problematic if errors occurred during second part.
basically:
{"email": "foo@foo.com", "password": "barbar", "first_name":"baz", "last_name":"buzz", "profile": {"cdata":"1" "other":"0" "sex":"m"} "message": "i don't know comes after buzz in foo bar baz buzz etc." }
should separate arrays in view? if so, how tell serializers separated array of data should take?
(this profile data saved onetoone field user model)
if can show me succinct way of handling this, grateful.
please let me know if can or if u need more info. appreciate time. thanks.
Comments
Post a Comment