django datatables json code example
Example: populate DataTable from django json
$( "#my-table" ).dataTable({
data: {{ my_json_data|safe }},
columns: [
{data: 'field_1'},
// ...
{data: 'field_n'}
]
});
$( "#my-table" ).dataTable({
data: {{ my_json_data|safe }},
columns: [
{data: 'field_1'},
// ...
{data: 'field_n'}
]
});