Reputation: 111
Good morning mates, I am trying to pass some values to a view in Django.
I have a table (Datatables) with n values (id, name, lastname, etc), and I'd like to select some values and pass them (just the id) to the view and process it later. I can select multiple values and it works properly:
$('#btnSelectedRows').on('click', function() {
var tblData = table.rows('.selected').data();
var tmpData;
$.each(tblData, function(i, val) {
tmpData = tblData[i];
alert(tmpData);
});
})
The problem comes when I try to "tell" the view what values I want to process, I don't know how to send this values to the view.
Thanks a lot
Upvotes: 0
Views: 814
Reputation: 64
You have to send ajax request to your view_func and process the response on client-side. example here
Upvotes: 1