I have a contact form through which users would be able to contact me. I am using django with ajax, and it works fine if there\'s no error. I would like to show
You need to define status_code argument for JsonResponse.
status_code
JsonResponse
return JsonResponse(data, status_code=400)
This way it will end up in the error callback in $.ajax.
error