Re: [web2py] SQLform.grid request not sending bool valuis

2020-11-24 Thread Vid Ogris
Yes they are writable. V V sre., 25. nov. 2020 ob 04:31 je oseba AGRogers napisala: > Are the boolean fields writable? I think unwritable fields are excluded > from request.vars. > > ___ > *www.TenOutOfTen.org* > rogers...@gmail.com > (+95) 0

Re: [web2py] SQLform.grid request not sending bool valuis

2020-11-24 Thread AGRogers
Are the boolean fields writable? I think unwritable fields are excluded from request.vars. ___ *www.TenOutOfTen.org* rogers...@gmail.com (+95) 09 250018669 (Myanmar) On Tue, 24 Nov 2020 at 22:21, Yebach wrote: > Hello > > I have a SQLform.

Re: [web2py] SQLFORM.grid search type error reduce()

2017-08-15 Thread Paul Ellis
ok no more errors. If I search for a name (John) for example in the table i get everything, Or for his ID (11) I get everything. I realise this is a join table (Many to Many) so it's no big deal but the search here is not very useful. I will need to implement special grids for these situations.

Re: [web2py] SQLFORM.GRID Change Header and labels too?

2017-04-07 Thread Javier Pepe
Hi You can use de label atribute in Field definition, this used in all forms. - label is a string (or a helper or something that can be serialized to a string) that contains the label to be used for this field in auto-generated forms. http://www.web2py.com/books/default/chapter/29/06/t

Re: [web2py] SQLFORM.grid change form vars

2016-03-19 Thread Vinyl Darkscratch-Kazotetsu
Ah, I see what my problem is — the default was defined after the SQLFORM.grid() in the controller, not before it. Works like a charm, no errors or issues. As for onvalidation, I’ll give it a whirl and see how it goes. Thank you. > On Mar 15, 2016, at 22:42, Anthony wrote: > > On Wednesday, M

Re: [web2py] SQLFORM.grid change form vars

2016-03-15 Thread Anthony
On Wednesday, March 16, 2016 at 1:32:26 AM UTC-4, Vinyl Darkscratch-Kazotetsu wrote: > > I see it now — I had assumed that you could set the default in the > controller function, but it seems that it has to be in the model file. > Thank you for your help on this issue. > No, default can be set

Re: [web2py] SQLFORM.grid change form vars

2016-03-15 Thread Vinyl Darkscratch-Kazotetsu
I see it now — I had assumed that you could set the default in the controller function, but it seems that it has to be in the model file. Thank you for your help on this issue. Still, though…I would like to know how to edit the variables submitted by the form, and still unsure how to do that.

[web2py] Re: Web2py SQLFORM.grid with executesql

2015-11-14 Thread Anthony
> > I stumbled on this: > > https://groups.google.com/forum/#!topic/web2py/b5UMpF-3REI > > > but i didn't really get the solution. > The solution mentioned there is the same as this one on Stack Overflow, which involves creating a view or table in th

Re: [web2py] [SQLFORM.grid] fields order in view / request.args(0)

2015-11-07 Thread Vinicius Assef
I didn't understand your 1st question. To solve your 2nd problem, pass the `fields` argument as a list. -- Vinicius Assef On 7 November 2015 at 21:53, Mamisoa Andriantafika wrote: > [SQLFORM.grid] fields order in view / request.args(0) > > Hi, > > I have 2 questions relative to this controll

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2015-06-05 Thread Alex Glaros
vars passed to controller doing grid search disappear seem that updating w2p to keep the vars after grid search would be a good improvement thanks! Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

Re: [web2py] SQLFORM.grid multiple left joins and where clause

2015-05-11 Thread A36_Marty
Thanks for your response. I changed the fields to a list and that works fine. Ditto for the field.represent feature. Thanks! I am still having problems getting the WHERE clause correctly inserted in the query. (The 2-3 different query assignments I originally posted were variations I had t

Re: [web2py] SQLFORM.grid multiple left joins and where clause

2015-05-11 Thread Johann Spies
On 10 May 2015 at 04:26, A36_Marty wrote: > > fields = db.auth_user.first_name, db.auth_group.role > Make that fields = [db.auth_user.first_name, db.auth_group.role] fields should be a list. query = (db.auth_user)&(db.auth_group.id == PARENT_GROUP_ID) #get query not supported error by t

[web2py] Re: web2py sqlform.grid join problem

2015-01-04 Thread Tim Richardson
Do you know how to use web2py's DAL to make a query which joins tables? http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Inner-joins Once you do, give that query to SQLFORM.grid Note that you need to understand what exactly a DAL "query" is. The term is subtly d

Re: [web2py] SQLFORM.grid custom search where is the error?

2014-11-18 Thread Prasad Muley
This problem still exist in web2py 2.9.6. I've tried to use custom grid search But It is showing me "invalid query" near grid. On Thursday, February 21, 2013 10:09:33 PM UTC+5:30, Mandar Vaze wrote: > > I'm using Version "2.3.2 (2012-12-17 15:03:30) stable" and the problem > still persists. i

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2014-10-27 Thread Alen Cerovic
Hi Mandar, as you pointed me to source it seems there is still just args parameter. I tried with session.vars but somehow I was loosing those vars and it just did not feel right to me. I ended up switching to args and pass those request.args to grid as args parameter. It works now but I like i

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2014-10-27 Thread Mandar Vaze
Current code looks like this : https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2031 See if it helps -Mandar P.S. : I posted original query (2 yrs ago) but as mentioned earlier in the thread - I ended up using session variable though. -- Resources: - http://web2py.com - http://w

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2014-10-25 Thread Alen Cerovic
two years later I am struggling with same problem, is grid vars parameter now included in web2py? Dana srijeda, 24. listopada 2012. 11:56:21 UTC+2, korisnik Niphlod napisao je: > > isn't this a little silly ? we have an args parameter to the grid but not > a vars one > > Could you try to te

Re: [web2py] SQLFORM.grid: sorting

2014-07-18 Thread Massimo Di Pierro
You cannot a have an inner join in smartgrid. That's the biggest difference in this case. You can have orderby. On Monday, 21 May 2012 15:47:53 UTC-5, Jim S wrote: > > Massimo - Is there a way to do it with a .smartgrid. I know the question > wasn't on .smartgrid, but I'm using that extens

Re: [web2py] SQLFORM.grid: sorting

2014-07-18 Thread Jacinto Parga
Hi, I solved it putting the foreing key format in the controller, before the grid: def familia_manage(): *db.auth_user._format = '%(last_name)s %(first_name)s'* fields=[db.t_familiares.f_nombre, db.t_familiares.f_apellidos,db.t_familiares.f_titular] form = SQLFORM.grid(db.t_familia

Re: [web2py] SQLFORM.grid search with custom request.vars

2014-05-06 Thread Anthony
On Tuesday, May 6, 2014 11:49:06 AM UTC-4, Paolo Valleri wrote: > > If I change the search form action to POST the whole url is preserved, and > the keywords variable is passed as request payload. However the search > doesn't work, I guest I have to change sqlform.grid in order to allows vars >

Re: [web2py] SQLFORM.grid search with custom request.vars

2014-05-06 Thread Paolo Valleri
If I change the search form action to POST the whole url is preserved, and the keywords variable is passed as request payload. However the search doesn't work, I guest I have to change sqlform.grid in order to allows vars as post_vars, is there a specific reason for having the search action as GET?

Re: [web2py] SQLFORM.grid search with custom request.vars

2014-05-05 Thread Richard Vézina
Maybe there is a need for vars property that could work similarily as args of SQLFORM.grid? Richard On Mon, May 5, 2014 at 8:28 AM, Paolo Valleri wrote: > Dear all, > I've implemented a method which uses SQLFORM.grid to show a subset of a > given table. The query that defines the subset is buil

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Richard Vézina
https://github.com/web2py/web2py/pull/428 On Wed, Apr 23, 2014 at 2:24 PM, Richard Vézina wrote: > Yop, you are right! > > I will send a PR on github and see what happen... > > Richard > > > On Wed, Apr 23, 2014 at 2:19 PM, Anthony wrote: > >> Maybe call it advanced_search. >> >> >> On Wednesd

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Richard Vézina
Yop, you are right! I will send a PR on github and see what happen... Richard On Wed, Apr 23, 2014 at 2:19 PM, Anthony wrote: > Maybe call it advanced_search. > > > On Wednesday, April 23, 2014 1:52:59 PM UTC-4, Richard wrote: >> >> This could be a new feature for .grid()... >> >> In gluon/sq

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Anthony
Maybe call it advanced_search. On Wednesday, April 23, 2014 1:52:59 PM UTC-4, Richard wrote: > > This could be a new feature for .grid()... > > In gluon/sqlhtml.py near line 2261... > > This : > > INPUT(_name='keywords', _value=request.vars.keywords, >_id=skeywords_id, >_on

Re: [web2py] SQLFORM.grid() simple search vs complex search

2014-04-23 Thread Richard Vézina
This could be a new feature for .grid()... In gluon/sqlhtml.py near line 2261... This : INPUT(_name='keywords', _value=request.vars.keywords, _id=skeywords_id, _onfocus="jQuery('#%s').change();jQuery('#%s').slideDown();" % (spanel_id, sfields_id)), Could become this : INP

Re: [web2py] SQLFORM.grid to view and using groupby clause

2013-11-13 Thread Niphlod
you can't have a column in the grid with a groupby that is not the groupby itself or an aggregate of another column, just like you can't in SQL. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/

Re: [web2py] SQLFORM.grid to view and using groupby clause

2013-11-13 Thread Meir
Hello Johann, It's why I created this view with the concept of cube to BI. I carry a lot of information forlater summarize according to the parameters of the users, but this I do in web2py. I'm working with web2py like my small BI ... Then the assembly is accomplished in various ways as defined

Re: [web2py] SQLFORM.grid to view and using groupby clause

2013-11-13 Thread Meir
Hello Johann, It's why I created this view with the concept of cube to BI. I carry a lot of information forlater summarize according to the parameters of the users, but this I do in web2py. I'm working with web2py like my small BI ... Then the assembly is accomplished in various ways as defined

Re: [web2py] SQLFORM.grid to view and using groupby clause

2013-11-13 Thread Johann Spies
Why not use the 'group by' in the creation of the view and then you can just view the view using the grid with no need to group by again in the grid? Regards Johann On 13 November 2013 03:06, Meir wrote: > > Hello, > > I have the following problem: I have created a view in the legacy database.

Re: [web2py] SQLFORM.grid prints output to console

2013-10-17 Thread Johann Spies
There is a print statement in gluon/sqlhtml.py at line 2373 if I am remember correctly. Just comment it out or remove the line. This was already done in the trunk. Regards Johann On 16 October 2013 06:26, Hadi Sunyoto wrote: > I just check the newest version 2.7.4 in windows, when i display

Re: [web2py] sqlform.grid query question

2013-09-05 Thread Richard Vézina
Good! Richard On Thu, Sep 5, 2013 at 5:55 AM, António Ramos wrote: > Bingo! > having =(count1 % 2* *==* *1) > > > 2013/9/5 António Ramos > >> Going with SQLTABLE i have my rows queried like >> >> count1=db.card_logs.id.count() >> >> (db.)select(db.trabalhador.nome,db.trabalhador.area,

Re: [web2py] sqlform.grid query question

2013-09-05 Thread António Ramos
Bingo! having =(count1 % 2* *==* *1) 2013/9/5 António Ramos > Going with SQLTABLE i have my rows queried like > > count1=db.card_logs.id.count() > > (db.)select(db.trabalhador.nome,db.trabalhador.area,count1,groupby=db.trabalhador.nome, > *having =(count1 % 2 = 1)*) > > > the *having* c

Re: [web2py] sqlform.grid query question

2013-09-05 Thread António Ramos
Going with SQLTABLE i have my rows queried like count1=db.card_logs.id.count() (db.)select(db.trabalhador.nome,db.trabalhador.area,count1,groupby=db.trabalhador.nome, *having =(count1 % 2 = 1)*) the *having* clause is not accepted , how to do it to query only odd counts? I use sqlite!

Re: [web2py] sqlform.grid query question

2013-09-04 Thread Richard Vézina
Ok, so you need to check against actual time which person are still in... If you really just want the persons/users that are still in a give time, I think you need a group by over user_id... So you could set a limit of 2 records per user and if you have only one and it is a 'check in' stat value y

Re: [web2py] sqlform.grid query question

2013-09-04 Thread Richard Vézina
Don't understand what you need exactly... Is stat a string type containing 'check in' or 'check out' and you want just odd number of record or you have an other field with timestamp or something and you want only the odd hours to appear in the grid?? Richard On Wed, Sep 4, 2013 at 12:54 PM, Antó

Re: [web2py] sqlform.grid query question

2013-09-04 Thread António Ramos
If the user checks his rfid tag within 5 minutes of the last check the log does not record "check in" or "check out" but "error" 2013/9/4 António Ramos > yes , stat is a string with "chech in" or "check out" i also have a > timestamp for the check in or check out. > > I dont want odd /even hour

Re: [web2py] sqlform.grid query question

2013-09-04 Thread António Ramos
yes , stat is a string with "chech in" or "check out" i also have a timestamp for the check in or check out. I dont want odd /even hours I want to know if the user is checked in I have an RFID app to check in /out outside workers via an rfid tag. when the user checks firstime, the app records "

Re: [web2py] SQLFORM.grid : formstyle, readable and writable control

2013-07-10 Thread andypaps
Hi There, I am looking for a web2py developer for a medium sized job. Please could you help me?? Anyone. My email is a...@simsend.com Thank you! Andy On Wednesday, 9 November 2011 22:55:25 UTC+2, Richard wrote: > > Hello, > > I would like to know I can control generated form with SQLFORM.grid..

Re: [web2py] SQLFORM.grid icons

2013-05-13 Thread Roberto Perdomo
If you like change the icons I recomend rewrite the links with the links parameter of the grid, something like: links = [lambda row: A(TAG[''](SPAN(_class="icon icon-list"),SPAN('List', _class="buttontext button", _title="list")), _class="w2p_trap button btn", _href=URL('see_list', args=[row.id]))

Re: [web2py] SQLFORM.grid icons

2013-05-13 Thread Roberto Perdomo
2013/5/12 Ovidio Marinho > How to replace icons link inside the sqlform.grid??? > > > > Ovidio Marinho Falcao Neto > Web Developer > ovidio...@gmail.com >83 8826 9088 - Oi >83 9336 3782 - Claro > Br

Re: [web2py] SQLFORM.grid() and Search

2013-05-02 Thread Richard Vézina
Ok, no improvement on contains like search in trunk... I will try to make a dummy app with table a fields labelled and explain how the search could behave in case someone want to obfuscate the database table and field names... Richard On Thu, May 2, 2013 at 2:16 PM, Niphlod wrote: > uhm, ok.

Re: [web2py] SQLFORM.grid() and Search

2013-05-02 Thread Niphlod
uhm, ok. try the trunk version, then post your requirements with examples, and then I'll surely take a look into it, ok ? On Thursday, May 2, 2013 4:46:24 PM UTC+2, Richard wrote: > > Maybe I should update, because with web2py 2.3.2 I can't search a la > "contains" in all the columns... > > Rich

Re: [web2py] SQLFORM.grid() and Search

2013-05-02 Thread Richard Vézina
Maybe I should update, because with web2py 2.3.2 I can't search a la "contains" in all the columns... Richard On Wed, May 1, 2013 at 4:47 PM, Cliff Kachinske wrote: > I like the latest search in grid/smartgrid a lot. A very nice piece of > work. > > I do have a tiny concern about exposing tab

Re: [web2py] SQLFORM.grid() and Search

2013-05-01 Thread Cliff Kachinske
I like the latest search in grid/smartgrid a lot. A very nice piece of work. I do have a tiny concern about exposing table names to the world at large, though. Maybe it would be possible to obfuscate the table name by presenting the plural of the table. On Wednesday, May 1, 2013 4:23:23

Re: [web2py] SQLFORM.grid() and Search

2013-05-01 Thread Richard Vézina
Wasn't know about your explanation for point 3 (contains() manner), so this one seems to be solved. Will test if we can do, a b to make sure it search for a & b in association in all the columns though... About 2, I agree with you it is a bigger challenge. But I think it could work at least for s

Re: [web2py] SQLFORM.grid() and Search

2013-05-01 Thread Niphlod
uhm.. 2. seems hard but not impossible. However, what do you need specifically ? instead of *auth_user.first_name="hello"* just *First name="hello"* or *whatever suites me best=Hello*? What if some column names collide ? 3. unless you're referring to custom-coded filters in datatables.net,

Re: [web2py] SQLFORM.grid custom search where is the error?

2013-02-21 Thread Mandar Vaze
I'm using Version "2.3.2 (2012-12-17 15:03:30) stable" and the problem still persists. i.e. I'm still getting "Invalid Query" error. I'm using Alex's workaround which seems to be working. Thanks Alex. -Mandar On Friday, September 28, 2012 6:07:13 PM UTC+5:30, Massimo Di Pierro wrote: > > Clearl

Re: [web2py] SQLFORM.grid and the maxtextlength parameter: The parameter doesnt work in my code

2013-01-18 Thread Javier Pepe
Hello maxtextlength is for all fields, you need use maxtextlengths http://web2py.com/book/default/chapter/07#SQLFORM.grid-and-SQLFORM.smartgrid On Fri, Jan 18, 2013 at 9:40 AM, Sverre wrote: > I have the controller: > > def commodities(): > tbl = db.commodities > fields = [tbl.itemcod

Re: [web2py] SQLFORM.grid

2012-12-18 Thread Johann Spies
On 13 December 2012 23:08, Drew wrote: > Greetings, > > I'd like to use the sql 'distinct' in a SQLFORM.grid 'query', but it is > only valid as parameter in the 'select' method. > I guess the 'group' parameter to SQLFORM.grid would work, but then I have > to build the columns to group by, which s

Re: [web2py] SQLFORM.grid + Linked page with SQLFORM.grid

2012-11-20 Thread vivek
Hi, Nope that didnt work, the result is the same On Tuesday, November 20, 2012 6:10:25 PM UTC+4, Johann Spies wrote: > > On 20 November 2012 13:05, vivek >wrote: > >> Hi , >> I have a grid , with links to pages which has another grid. >> >> constraints = {'db.lead':qcomm} >> fo

Re: [web2py] SQLFORM.grid in LOAD

2012-11-20 Thread Johann Spies
On 20 November 2012 15:02, vivek wrote: > > Hi , > > I have a grid as a LOAD component , everything works fine , except > for delete. If i was to click on delete , and then cancel it (d

Re: [web2py] SQLFORM.grid + Linked page with SQLFORM.grid

2012-11-20 Thread Johann Spies
On 20 November 2012 13:05, vivek wrote: > Hi , > I have a grid , with links to pages which has another grid. > > constraints = {'db.lead':qcomm} > form = SQLFORM.smartgrid(db.lead,constraints = constraints,deletable= > False,details=False, links = [lambda row: A(SPAN(_class='icol-commen

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-12 Thread Johann Spies
On 12 November 2012 11:13, Niphlod wrote: With the jids= notation the current grid won't have any functional > pagination,ordering, export, etc. That's because vars are not propagated. I > sent a patch to Massimo for that a few days ago. > > Thanks. I have used session variables to do that in th

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-12 Thread Niphlod
With the jids= notation the current grid won't have any functional pagination,ordering, export, etc. That's because vars are not propagated. I sent a patch to Massimo for that a few days ago. The question still stands: without using jids= and using only keywords= "styled urls" when you click on

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Niphlod
ok, give me some hints at least (trying to reverse engineer here :P). when you go to http://localhost:8000/init/journal/journals how many records are returned ? I assume 1. in other words: are you using request.vars.jids to create the query you pass on the tables ? If yes, I remember someon

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Johann Spies
On 8 November 2012 15:32, Niphlod wrote: > ehm missing something here. jids is not a standard var for the grid, > are you using that var to filter the query passed to the grid ? > > One thing is taking care of the default filtering (keywords variable), > another is to accomplish the same thin

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Niphlod
ehm missing something here. jids is not a standard var for the grid, are you using that var to filter the query passed to the grid ? One thing is taking care of the default filtering (keywords variable), another is to accomplish the same thing with a customization like that. On Thursday,

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Niphlod
what is the url you exported from ? (i.e. hover on the export link and paste here (the relevant part is from the controller onwards)) On Thursday, November 8, 2012 11:08:11 AM UTC+1, Johann Spies wrote: > > On 7 November 2012 17:38, Niphlod > wrote: > >> patch to apply to trunk. Please test it ex

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Johann Spies
On 7 November 2012 17:38, Niphlod wrote: > patch to apply to trunk. Please test it extensively with all the possible > combinations. > I applied the patch but did not see any different behaviour. A view with two records in the grid exported the whole table of more than 1 records. And yes,

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
patch to apply to trunk. Please test it extensively with all the possible combinations. On Wednesday, November 7, 2012 2:23:35 PM UTC+1, Niphlod wrote: > > at that point you miss formatting fields and references. In addition, > db.executesql() doesn't return an iterator either. You should code y

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
at that point you miss formatting fields and references. In addition, db.executesql() doesn't return an iterator either. You should code your own exporter using db._adapter.execute() and a yielding fetchone()s. On Wednesday, November 7, 2012 2:01:45 PM UTC+1, Johann Spies wrote: > > On 7 Novembe

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Johann Spies
On 7 November 2012 15:01, Johann Spies wrote: > > In that case I would be inclined to use bypass DAL and db.executesql and > use the backend to export to a file. That should be more efficient. > Sorry. That should read ... inclined to bypass DAL and use db.executesql ... -- Because experienci

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Johann Spies
On 7 November 2012 14:05, Niphlod wrote: > if your set doesn't fit into memory, saving it to a temp file won't get > you out of troubles. One of DAL problems is that a Rows object does not > return an iterator from the cursor, it's fetched all into memory first. > > In that case I would be inclin

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
if your set doesn't fit into memory, saving it to a temp file won't get you out of troubles. One of DAL problems is that a Rows object does not return an iterator from the cursor, it's fetched all into memory first. On Wednesday, November 7, 2012 12:45:46 PM UTC+1, Johann Spies wrote: > > On 7 N

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
far too magic to check for something that basically isn't trustable: even if you code something like that and you check that there's x mb available, another user can ask for another huge set of data and your "previoulsy" free RAM is not free anymore. On Wednesday, November 7, 2012 11:59:18 AM U

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
woking on 1. for 2, how do you "foresee" how much time and RAM the present query will take to be serialized ? On Wednesday, November 7, 2012 11:25:29 AM UTC+1, Johann Spies wrote: > > On 7 November 2012 10:56, Niphlod > wrote: > >> uhm, good point on "if you want the entire table, just remove the

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Niphlod
uhm, good point on "if you want the entire table, just remove the filters". how to handle something that is impossible to handle (export a table with so many rows that you can't export without timeouts or consuming memory). just timeout ? On Wednesday, November 7, 2012 2:17:02 AM UTC+1, howe

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread howesc
i agree that i expected the export buttons to export what is shown above. if you want to export the whole table, remove all filters so that the whole table is shown above and then click export. (note that i do expect export to export all the rows that match the query even if the table above is

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Bill Thayer
FWIW, My users will be filtering test station settings to upload the csv to thier test bench software. My users will need only thier own filtered data in the CSVso big Me Too! here --

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Cliff Kachinske
I think it depends on how many records are in the table. If you get a couple million rows, that's quite a load for a spread sheet to import. On Tuesday, November 6, 2012 9:24:26 AM UTC-5, Niphlod wrote: > > to me instead it's useful to let them download the whole table are we > saying we

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Niphlod
to me instead it's useful to let them download the whole table are we saying we should support 6*2 = 12 formats (current 6, "with filters" and "without filters") ? How would you name them ? --

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Aurelijus
I would personally expect the export to give the representation only of the fields I've made a query for. On Tue, Nov 6, 2012 at 4:10 PM, Johann Spies wrote: > On 6 November 2012 15:57, Niphlod wrote: > >> one sec. >> export is meant to give the user the full resultset he can access (let's >>

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Johann Spies
On 6 November 2012 15:57, Niphlod wrote: > one sec. > export is meant to give the user the full resultset he can access (let's > say, offline consultation). > Currently, only the "with hidden cols" exports honour the current query. > Before calling it a bug we should agree on what functionalities

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Niphlod
one sec. export is meant to give the user the full resultset he can access (let's say, offline consultation). Currently, only the "with hidden cols" exports honour the current query. Before calling it a bug we should agree on what functionalities expose on the grid . Il giorno martedì 6 novembr

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Aurelijus Useckas
OK On Tuesday, November 6, 2012 3:35:10 PM UTC+2, Johann Spies wrote: > > On 6 November 2012 12:50, Aurelijus Useckas > > > wrote: > >> I want to export a certain query in SQLFORM.grid to a CSV, but once I >> press on the (any) export option bellow the SQLFORM.grid, it exports the >> whole tab

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Johann Spies
On 6 November 2012 12:50, Aurelijus Useckas wrote: > I want to export a certain query in SQLFORM.grid to a CSV, but once I > press on the (any) export option bellow the SQLFORM.grid, it exports the > whole table and not just the ones meeting the certain criteria. This must be viewed as a bug in

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-25 Thread Niphlod
a) you can have the search form to do a get instead of a post. In that way when the user presses the button "submit" he is redirected to your page, and that page can load the grid with the parameters specified into request.vars b) with this you are sure that the parameters are reset if the user

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread Mandar Vaze / मंदार वझे
On Wed, Oct 24, 2012 at 12:10 PM, lyn2py wrote: > When/where should I "clean" these variables from session ? >> In case user directly accesses second URL (without going thru first URL >> to select the search criteria) they might see incorrect results - since >> controller function will use "old"

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread Mandar Vaze / मंदार वझे
Even if we were to add ability in grid to take vars as params - it may not be useful in my case (I think) because when controller is invoked for view/search/pagination, "original" request.vars are lost (that is why saving in session is needed) -Mandar On Wed, Oct 24, 2012 at 3:26 PM, Niphlod wro

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread Niphlod
isn't this a little silly ? we have an args parameter to the grid but not a vars one Could you try to test a little mod to the source. - open gluon/sqlhtml.py and scroll until "def grid(" - add a vars={} default parameter - a few line below, there's "def url(**b)" - change with this

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-23 Thread lyn2py
> > When/where should I "clean" these variables from session ? > In case user directly accesses second URL (without going thru first URL to > select the search criteria) they might see incorrect results - since > controller function will use "old" values > I suggest to ensure that URLs must be

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-23 Thread lyn2py
In my case I was setting over the same session var, and each time checking the same var. --

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-23 Thread Mandar Vaze / मंदार वझे
lyn2py : Thanks. Your suggestion worked (you correctly understood the requirement) This thread elsewhere also suggested (indirectly) using the sessions. ( https://groups.google.com/forum/?fromgroups=#!searchin/web2py/sqlform$20with$20args/web2py/GC0EKaQ8Jjo/_tqgCZbctXkJ ) I was thinking in the di

Re: [web2py] SQLFORM.grid / appadmin: self-reference question

2012-10-22 Thread lyn2py
Thanks Richard! On Monday, October 22, 2012 11:41:11 PM UTC+8, Richard wrote: > > It is a feature of list:reference... It may be broken for self-referenced > table. There was an issue with self-reference in the pass, don't know if it > get fixed or not. > > You may have a look to pending issue o

Re: [web2py] SQLFORM.grid / appadmin: self-reference question

2012-10-22 Thread Richard Vézina
It is a feature of list:reference... It may be broken for self-referenced table. There was an issue with self-reference in the pass, don't know if it get fixed or not. You may have a look to pending issue on google code. Richard On Mon, Oct 22, 2012 at 11:08 AM, lyn2py wrote: > I have a table

Re: [web2py] SQLFORM.grid dinamically update fields

2012-10-03 Thread Javier Pepe
chech this http://web2py.com/books/default/chapter/29/07?search=onupdate may help. On Wed, Oct 3, 2012 at 9:49 PM, alex wrote: > > I have a SQLFORM.grid. > When the user updates field 'a' in the grid, before submitting the form, > field 'b' should represent a calculation based on value of

Re: [web2py] SQLFORM.grid custom search where is the error?

2012-09-28 Thread alex
Thank you Massimo, I have just tried with web2py-web2py-af258c3, latest trunk, and the situation didn't changed. On Friday, September 28, 2012 9:37:13 PM UTC+9, Massimo Di Pierro wrote: > > Clearly something is wrong I will try this today. Before I do, could you > check the latest trunk? > >

Re: [web2py] SQLFORM.grid custom search where is the error?

2012-09-28 Thread Massimo Di Pierro
Clearly something is wrong I will try this today. Before I do, could you check the latest trunk? On Friday, 28 September 2012 04:36:26 UTC-5, alex wrote: > > Thank you Johann, of course I did already, > > The query itself gets translated correctly. > I think that something very subtle is happeni

Re: [web2py] SQLFORM.grid custom search where is the error?

2012-09-28 Thread alex
Thank you Johann, of course I did already, The query itself gets translated correctly. I think that something very subtle is happening when I pass search_widget= search_form, and I cannot catch it I uploaded herethe packed version

Re: [web2py] sqlform.grid : checkbox in header and confirmation before submit

2012-09-19 Thread Mandar Vaze / मंदार वझे
Johann, > 2. I also get "Submit Query" button below the table. I've managed to >> rename this to "Delete Selected" - Is there a way to show a confirmation >> dialog like "Are you sure you want to delete all the selected entries" (or >> some such) - before the records are deleted ? >> >> > I use t

Re: [web2py] sqlform.grid : checkbox in header and confirmation before submit

2012-09-18 Thread Massimo Di Pierro
http://web2py.com/books/default/search/29?search=FORM.confirm On Tuesday, 18 September 2012 07:10:42 UTC-5, Johann Spies wrote: > > On 18 September 2012 12:50, Mandar Vaze >wrote: > >> Hi, >> >> I'm using "selectable=True" in the sqlform.grid. This shows a checkbox in >> first column for all the

Re: [web2py] sqlform.grid : checkbox in header and confirmation before submit

2012-09-18 Thread Johann Spies
On 18 September 2012 12:50, Mandar Vaze wrote: > Hi, > > I'm using "selectable=True" in the sqlform.grid. This shows a checkbox in > first column for all the rows "except the header" > > 2. I also get "Submit Query" button below the table. I've managed to > rename this to "Delete Selected" - Is t

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread Massimo Di Pierro
Anyway, thank you for brining out security issues. It is very important for web2py. The more people look at it from the security point of view, the better. On Friday, 7 September 2012 15:33:11 UTC-5, MichaelF wrote: > > Ahhh; thanks for pointing that out. I had breezed over the mention about >

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread MichaelF
Ahhh; thanks for pointing that out. I had breezed over the mention about digitally signed (my fault). Makes sense. I'll have to think about the public db keys. Using them through web2py seems to be handled, though. Thanks again. Michael On Friday, September 7, 2012 1:39:47 PM UTC-6, Massimo Di

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread Massimo Di Pierro
I should add that if user_signature=False the tables are always exposed in readonly mode: SQLFORM.grid(..,editable=False, create=False, deletable=False) On Friday, 7 September 2012 14:50:56 UTC-5, Massimo Di Pierro wrote: > > I only talk for 2.0.x. > > Yes. That is prevented with the default use

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread Massimo Di Pierro
I only talk for 2.0.x. Yes. That is prevented with the default user_signature=True. If you disable user signature with user_signature=False than you expose yourself to major security risks and may expose the entire database. user_signature = False should only be used for testing or if you manua

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread Kevin Cackler
I guess I need to look into the auth.signature functionality. We already had our grid conditional be db.pages.stores_id=STORE_INFO.id but we were able to edit Store 1's page while logged into Store 2's administration area, just by changing the ID in the URL. Are you saying that auth.signature

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread Massimo Di Pierro
In some sense the grid does what you say. For example: @auth.requires_login() def index(): db.define_table('thing',Field('name'),auth.signature) grid = SQLFORM.grid(db.thing.created_by==auth.user_id) return locals() Notice all the URLs linked by the grid are digitally signed. They

Re: [web2py] sqlform.grid and query conditions

2012-09-07 Thread MichaelF
Thanks, Massimo. Re. needing a way to reference individual records: of course. But it doesn't have to be the internal record id (primary key value). The php code we used gave out unique-per-request values so that one couldn't, say, use a key retrieved from one form in another form. The @auth i

  1   2   >