[Answer]-How to access the data passed from the views in ajax

1👍

It seems you are mixing Javascript, Django views and Django templates.

In the javascript success callback, you can only use objects from your json response. (I simplify)

success : function(result, data) {
    // Dump objects
    console.log(result);
    console.log(data);
}

When your JSON response is correct, the javascript processing part has nothing to do with Django.

Leave a comment