[Answered ]-I can't get response from my views.py to my AJAX call

1👍

you are returning render of cards.html in the view snippet you show:

return render(request, 'cards.html', {'duo_filter': shuffled_list})

Render generates an html page.

Do you just want to return json?

from django.http import JsonResponse
return JsonResponse({'duo_filter': shuffled_list})

Leave a comment