How to work with complex structures in Django REST API.
(Noob question perhaps, yet experience in Django is not enough)
Trying to Google some options serialization in Django, and all the examples are tied to individual models. This is understandable. But I need to send to the client a complex JSON which contains various data (simple and instances of models).
someAnotherVar: "hello world",
where user is an instance of the model User a posts an array of the last 5 Post.
And accordingly in the reverse direction comes to have the json structure.