Hey,

I have 3 models (School, Program and Class)
School and Program have a m2m relationship
Class has foreign keys to both school and program
In my endpoint I want json data looking like this:
School
|_ Program 
     |_ Class
I can get my head around nesting the serializers I just don't know how to 
filter the classes for that specific School inside of the program 
serializer.

In the Program serializer I call the Class serializer, however with this 
approach I'll get all the classes in the same program from every school. I 
want just the classes in this particular school. How should I do this?

-- 
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