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"
.
- [Django]-Python model inheritance and order of model declaration
- [Django]-How to unit test image upload in Django REST Framework
- [Django]-How to resolve No module named _sqlite3 when I create Django application?
Source:stackexchange.com