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: 2,808Questions: 85Answers: 406

    Hard to tell. Please post a test case.

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

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,770

    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.