Using Python backend
Using Python backend
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: Hi!
I'm trying to use a Python backend, but I need some more documentation.
A complete example with .html, .js and relevant parts of the .py would be really nice. I've looked through published examples on datatables.net, but do not find anything like this.
I have imported the relevant libraries in my .py, I hope:
from sqlalchemy import create_engine
from datatables_server import Editor, Field, DataTable, Column
Answers
There aren't any Python docs on this site. The docs for the Python library (datatables_server) should have config samples, etc. Are you using this library?
Essentially you would configure a route, example from the above library's docs:
Then configure the Datatable to use ajax and build the table using the JSON repsonse, like this example pointing to your route. Like this:
Datatables and the Editor don't have knowledge of the backend so their docs won't change due to using Python. Refer to the Python library's docs for setting up the server side code.
I can try to anwer any Python questions you have but this forum isn't setup for Python support. Please let us know of any Datatables or Editor questions you have.
Kevin
A small correction, the documentation for the DataTables Python libraries is available here and you can download a demo Editor application for Python here. That includes all of the Editor demos (nearly all of the other examples on the site are client-side specific configuration, and thus are backend independent).
The one catch at the moment is that the upload for the Python libraries doesn't work. That is something I'll work on.
Allan