This is my datatable that works with a json file:
var table = $('.table').DataTable({
"lengthMenu": [[10, 25, 50,100, -1], [10, 25, 50,100, "All"]],
"pageLength": 10,
"data":{{ output.data|raw }},
It works well like this.
To get the datatable faster I added this lines:
var table = $('.table').DataTable({
"serverSide": true,
"lengthMenu": [[10, 25, 50,100, -1], [10, 25, 50,100, "All"]],
"pageLength": 10,
"data":{{ output.data|raw }},
"processing": true,
Now I get the error
DataTables warning: table id=DataTables_Table_0 - Invalid JSON response
The json comes directly from a json file with data.
serverSide: truethen you should not usedata. Provide the URL to the JSON file in theajaxproperty. See the documentationTypeError: c is undefined