I'm trying to access some string from django models using ajax. I'm new to ajax and i don't know where I'm going wrong.
Here is Jquery code :- 
$(document).ready(function () {
    $("input.ssd").click(function () {
        var lsid = $(this).attr("id");
        lsid = Number(lsid);
        $.ajax({
            type: "POST",
            url: "/a_solution/",
            data: {
                l_sid: lsid,
            },
            success: console.log("success")
            datatype: 'html',
            error : console.log("oops! something went wrong"),
        });
    });
});
Here is url mapping in urls.py :
 url(r'^a_solution/$', views.a_detail, name = 'a_detail'),
PS :- jquery.min.js:2 POST http://127.0.0.1:8000/a_solution/ 403 (Forbidden) jquery.min.js:2 XHR failed loading: POST "http://127.0.0.1:8000/a_solution/"
.
 
    