SearchPanes server-side issue with Python Flask
SearchPanes server-side issue with Python Flask
Link to test case: lxpnv.ru/server I'll close it when the problem will be resolved.
Source code: https://gist.github.com/LexPanov/8cb89c6515946fa0def2147656ed9ed9
Debugger code (debug.datatables.net): https://debug.datatables.net/ivosaj
Error messages shown: SearchPanes : "No data available in table"
Description of problem:
Hello,
My problem is related with this thread.
I am also trying to implement SearchPanes with server side DataTables, using Python Flask but there is nothing related to SearchPanes in POST request to server:
I also tried to pass searchPanes.options from server, nothing is changed.
So I created MVP with this issue, there are two versions: with "serverSide:" false/true (I'll close it when the problem will be resolved).
Source code is available at Gist
To run it: put HTML files in "templates" folder, run "pip install -r requirements.txt", and "python3 app.py" then.
This question has an accepted answers - jump to answer
Answers
SearchPanes doesn't actually send any information to the server when nothing is selected - see this example.
What is needed is for the server to respond with a
searchPanes
object with the options to display (see docs here), which your Python script is currently not doing.I'm afraid we don't write in Python ourselves - none of our published libraries are in that language, so I can't really help you with that aspect.
Allan
Thank you a lot
It was not clear from the manual that first you need to send a searchPanes object from the server with the data you want to display on the page in searchPanes.
I updated Gist, now it works how it's supposed to do (maybe not so efficient in terms of database access).