Re: [web2py] Datatables Query String Parsing

2017-08-05 Thread villas
Thanks Massimo and I will be very interested to try a Vue.js example. In the meantime, I have experimented with Datatables some more. I wrote my own sql and used executesql and then fed the entire resultset all at once into Datatables. My rows are in the hundreds rather than thousands, but

Re: [web2py] Datatables Query String Parsing

2017-08-04 Thread Massimo Di Pierro
I also think the grid is obsolete and its code is ugly. The concept of pagination is old. I think it is much better to have an api and a [more] button that adds item at the bottom, until a new search is done. I will post a vue.js example of that as soon as I can. On Tuesday, 1 August 2017 12:0

Re: [web2py] Datatables Query String Parsing

2017-08-01 Thread villas
Hi Richard, Thanks for your points of view and I find the discussion interesting. However I'm not sure that we are on the same page: For me, I would defenitly avoid using DTs as I found those kind of fancy > grid too heavy (to many plugins, to many js, flash stuff, etc.) Datatables is not th

Re: [web2py] Datatables Query String Parsing

2017-07-31 Thread Richard Vézina
Yes Villas you get good points... I think Massimo's had talked about abandonning SQLFROM.grid. I never been able to fully levrage it. Most of the time, I prefer handle forms myself, as they most of the time more complexe the what .grid() can handle. So there is no gain to having them to me... Toug

Re: [web2py] Datatables Query String Parsing

2017-07-31 Thread villas
Hi Richard / everyone Those are good strategies. However, I also feel that it is a pity that we are having to 'roll our own' solutions because the sqlform.grid just seems too slow. Your idea of avoiding pyDAL seems to greatly reduce queries, and so I am also tempted down this road. However

Re: [web2py] Datatables Query String Parsing

2017-07-31 Thread Richard Vézina
In my case I didn't activate server side processing, I instead reduce the length of the dataset to be displayed by year slicing... I had buttons to specify which years of data the user wants and an "All" button with a notice it could be long to load... It has reduce the load time of the page... So

Re: [web2py] Datatables Query String Parsing

2017-07-29 Thread villas
Thanks for responses and José that code will be a good help. In my case, parsing the query is quite trivial to extract a search string and the sort order, which is all I needed just now. After playing around more, it seems to me that Web2py would be really improved with something like Datatab

Re: [web2py] Datatables Query String Parsing

2017-07-28 Thread José Luis Redrejo
I have used it several times, I thought of doing a reusable class for it, but did't have time to do it yet. For a query with only one table involved this is one code example. I use the same code, with a small modifications in the way field values are requested, for queries with joined tables. That

Re: [web2py] Datatables Query String Parsing

2017-07-28 Thread Richard Vézina
Here they talk about data structure and list seems possible : https://datatables.net/manual/server-side#Example-data Richard On Fri, Jul 28, 2017 at 8:52 AM, Richard Vézina wrote: > Hello Villas, > > The subject interrest me, as I use DTs, but not the server-side feature... > But, I am not sure

Re: [web2py] Datatables Query String Parsing

2017-07-28 Thread Richard Vézina
Hello Villas, The subject interrest me, as I use DTs, but not the server-side feature... But, I am not sure what you want to achieve... I gonna read a bit about DTs server-side, waiting for precision from you and maybe will understand better your question then... Richard On Thu, Jul 27, 2017 a

[web2py] Datatables Query String Parsing

2017-07-27 Thread villas
Is there an simple way to parse this into an easier-to-work-with object. I mean for example 'columns' could be a list. {'columns[0][data]': 'first_name', 'columns[0][name]': '', 'columns[0][orderable]': 'true', 'columns[0][search][regex]': 'false', 'columns[0][search][value]': '', 'columns[