d AJAX POST request
                $.ajax({
                    url: url,
                    type: 'POST',
                    dataType: 'json',
                    data: {
                        csrfmiddlewaretoken:$('input[name=csrfmiddlewaretoken]').val(),
                    },
                    success: function (data) {
                        if (data['result'] == 'success') {
                            // Do something
                        }
                        if (data['message']) {
   