I am not able to bring in my REST API data from another table.

The scenario is as follows.

I have a kind of "team" that relates to the "User" class.
Therefore a join table was generated to join these classes in the database. 
So far so beautiful.

But my JSON NOT bring me the necessary information. Example:

{
    "Id": 1,
    "Name": "TEAM 1"
    "Datainicio", "08/18/2015",
    "EndDate" "09/20/2015"
    "Situation": "Enable"
    "User": [
        1,
       2
    ]
}

I did all the procedures as documentation of serializers relations. I 
created two separate serializers and called USER serializer in TEAM, but 
nothing appears.

http://www.django-rest-framework.org/api-guide/relations/#serializer-relations

I need him to return me in a personalized way:

    "Id": 1,
    "Name": "TEAM 1"
    "Datainicio", "08/18/2015",
    "EndDate" "09/20/2015"
    "Situation": "Enable"
    "User": [
        { "Id": 1, "username", "Alisson"},
        { "Id": 2, "username", "Malachi"}
    ]

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to