Adding DT_RowId into the datatables source

Issue #29 resolved
Phil Sheard created an issue

Hi Maciej, thanks for the library.

Something that's not mentioned in the docs is the act of adding a 'DT_RowId' column into the data. As the data from the view comes back an arrary rather than a dictionary, I've not been able to follow the Datatables tutorials which expect it as a named field in the object [1].

Have you any experience of solving this problem? I'd be happy to help update the docs if it's worked out.

Thanks. Phil

[1] e.g. https://datatables.net/examples/server_side/ids.html

Comments (4)

  1. Phil Sheard reporter

    Thanks Maciej, that's great and thanks for quick reply. I'm relatively new to Django (from Flask) and am regularly suprised by how extensive and customisable Django is. Formatting the queryset objects before returning them makes total sense.

  2. Log in to comment