Exemplo n.º 1
0
    def get_siblings(self, request, *args, **kwargs):
        queryset = self.filter_queryset(request, self.get_queryset(request))
        obj = self.get_object(request)
        Model = self.get_model(request)
        result = get_model_siblings(request, Model, obj, queryset)

        return JSONResponse(result)
Exemplo n.º 2
0
    def get_siblings(self, *args, **kwargs):
        queryset = self.filter_queryset(self.get_queryset())
        obj = self.get_object()

        return JSONResponse(
            get_model_siblings(self.request, self.model, obj, queryset))