[Fixed]-Can i send a message to a django template in an HttpResponseBadRequest?

1👍

✅

You’ve defined a global JS variable somewhere called msg.

If you want to refer to the data returned by the Ajax error, you need to accept it as a parameter in your fail function:

.fail(function(jqXHR, textStatus, error) {
    alert(jqXHR.responseText);
})

Leave a comment