1👍
✅
From the datatables manual:
For DataTables to be able to enhance an HTML table, the table must be valid, well formatted HTML, with a header (thead) and a body (tbody). An optional footer (tfoot) can also be used.
so your table is missing the required thead
and tbody
tags.
0👍
Unless your table has an id of myTable
, then it’s not going to work. It looks like you should change your jquery selector to be $('#users')
because that’s the table id that you have set in the code posted above.
- One of my few django migrations does not run
- DRF nested serializer put very deep field in top level without intermediary layers
0👍
In addition to thr table thead and tbody comment, Jquery datatables will automatically sort your table by the 1st column if you are using the default datatables constructor.
- Loading django.apps module inside the url patterns file
- Do force-download responses need to be handled by angular to work? (download requested from an angular $http.post call)
Source:stackexchange.com