[Django]-Django/Ajax get request

2👍

I think there is an error in your js Content negotietion

instead of

dataType: "json",

use

contentType: 'application/json',

or try without this field

1👍

Try return HttpResponse(serializer.data, content_type='application/json')
in your view.

And in your jQuery code change type: "GET" and remove dataType: "json".

Leave a comment