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})
Source:stackexchange.com