Я пытаюсь отправить таблицу JS в API Django Rest. Просмотрите и прочитайте этот параметр в функции get_queryset ()
Вот мой вызов ajax:
$.ajax({
type : "GET",
url : fetchDataUrl,
data : {
table : [10,20,30,40,50],
},
success : function(data){
},
error : function(data){
}
});
Вот мой APIView:
class LivreListAPIView(generics.ListAPIView):
serializer_class = BookSerializer
def get_queryset(self, *args, **kwargs):
table = self.request.GET.get("table",None)
...