def list(self, request, *args, **kwargs): subtree = self.get_object().get_descendants(include_self=True) return Response(to_tree(subtree)[0])
def list(self, request, *args, **kwargs): return Response(to_tree(self.get_queryset()))