Closed saifraider closed 7 years ago
@saifraider I've just added a very quick example in order to do that in a1068c2. Hope it helps !
Thank you so much. It would be nice if you can provide flask example
what matters here is this javascript code
"columnDefs": [ {
"targets": -1,
"data": null,
"defaultContent": "<a href='' class='edit'>Edit</a> / <a href='' class='delete'>Delete</a>"
} ]
The use of Flask or Pyramid isn't related to your problem.
My Datatable has 4 columns. id, name, email, edit/delete.
On server side, I have defined my columns as (User is my model) columns = [ ColumnDT(User.id), ColumnDT(User.username), ColumnDT(User.email) ] query = User.query.with_entities(User.id, User.username, User.email) params = request.args.to_dict() rowTable = DataTables(params, query, columns) return jsonify(rowTable.output_result())
returned data contains only 3 columns but my datatable has 4 columns. So I am getting an error. What should I do?