Loading json data from local endpoint in django application

Loading json data from local endpoint in django application

peter-werkpeter-werk Posts: 8Questions: 4Answers: 0

I have a problem loading my data from the local endpoint in Django application. Everything seems to be fine in the console data is showing properly no errors, just not loading my data into the DataTable

js component

var dt = $('#data').DataTable({
        "pageLength": 25,
        responsive:true,
        ajax: "/data/json/",
        columns: [{

Answers

  • rf1234rf1234 Posts: 3,000Questions: 87Answers: 421

    Hard to tell. Please post a test case.

    Have your checked your HTML? Is it really matching your datatable?

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954

    Looks like you need to use ajax.dataSrc to tell Datatables where to find the data. Use an empty string as shown in one of the examples. See this doc for more details.

    Kevin

Sign In or Register to comment.