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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -