function handle_unsuccessful_response(response) {
    try {
        var status_code = response.statusCode().status;
        response = JSON.parse(response.responseText);
        set_message("Result: " + "(" + status_code + ") " + response.msg, "warning");
    } catch (err) {
        // If the response is not a JSON response then it would be Django sending a HTML response
        // containing a stack trace and useful debugging information regarding the backend code.
        document.write(response.responseText);
    }
    return;
}
// API Callers: These methods handle communicating with the Python backend API.
API Callers: These methods handle communicating with the Python backend API.
API Callers : These methods handle communicating with the Python backend API .
function handle_unsuccessful_response(response) {
    try {
        var status_code = response.statusCode().status;
        response = JSON.parse(response.responseText);
        set_message("Result: " + "(" + status_code + ") " + response.msg, "warning");
    } catch (err) {
        document.write(response.responseText);
    }
    return;
}
function handle_unsuccessful_response ( response ) { try { var status_code = response . statusCode ( ) . status ; response = JSON . parse ( response . responseText ) ; set_message ( "Result: " + "(" + status_code + ") " + response . msg , "warning" ) ; } catch ( err ) { document . write ( response . responseText ) ; } return ; }
API Callers: These methods handle communicating with the Python backend API.
API Callers : These methods handle communicating with the Python backend API .
// If the response is not a JSON response then it would be Django sending a HTML response // containing a stack trace and useful debugging information regarding the backend code.