In web2py, variables from a POST request are in request.post_vars
, variables from the query string are in request.get_vars
, and both sets of variables are in request.vars
. So, in your controller, you can access those variables via request.vars.iDisplayStart
, request.vars.iDisplayLength
, etc.
DataTables Server-side Processing with web2py: how to access the parameters sent to the server
-
21-07-2023 - |
سؤال
When using server-side Ajax processing for DataTables, DataTables sends parameters from the view to the server so that the server can access the data source and return the correct data. I cannot figure out how, when doing server-side processing with web2py, to access those parameters that comes from the view.
These parameters are, for example, iDisplayStart, IDisplayLength, iColumns, etc.and are documented here: http://legacy.datatables.net/usage/server-side
I have no doubt this is simple and will result in a loud "doh!" from me, but I have been digging around for a couple days and haven't figured it out.
المحلول
لا تنتمي إلى StackOverflow