Tabletools set sSwfPath in Django

182 views Asked by At

How do I set the path for sSwfPath in Django?

$('#rTable').DataTable({
    paging: false,
    destroy: true,
    "dom": 'T<"clear">lfrtip', 
    "tableTools": {           
       "sSwfPath": "/static/copy_csv_xls.swf"
    }
});

I am loading my js and css files from static folder. It doesn't seem to be working for the swf.

1

There are 1 answers

2
davidkonrad On BEST ANSWER

Set an absolute path by using the CDN :

...
tableTools: {           
    sSwfPath: "http://cdn.datatables.net/tabletools/2.2.4/swf/copy_csv_xls_pdf.swf"
}