Skip to content

Instantly share code, notes, and snippets.

@tomchristie
Created July 25, 2013 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomchristie/6080592 to your computer and use it in GitHub Desktop.
Save tomchristie/6080592 to your computer and use it in GitHub Desktop.
@link()
def children(self, request, *args, **kwargs):
parent = self.get_object()
children = parent.children.all()
serializer = ChildSerializer(children, many=True)
return Response(serializer.data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment