My API is returning a JSON object on error but the status code is HTTP 200:
HTTP 200
response = JsonResponse({\'status
To change status code in JsonResponse you can do this :
JsonResponse
response = JsonResponse({'status':'false','message':message}) response.status_code = 500 return response