[web2py] Re: Pass a query from form to another function

2018-04-10 Thread Anthony
On Tuesday, April 10, 2018 at 6:14:06 PM UTC-4, Yoel Benitez Fonseca wrote: > > Is this not working any more ? > > >>> q = (db.photo.id == 1) > >>> db(q.as_dict(flat=True)).select() > File "", line unknown > SyntaxError: Operator not supported: eq > > That is in a web2py shell,i mean is the same

[web2py] Re: Pass a query from form to another function

2018-04-10 Thread Anthony
> > On Tuesday, April 10, 2018 at 3:14:06 PM UTC-7, Yoel Benitez Fonseca wrote: >> >> Is this not working any more ? >> >> >>> q = (db.photo.id == 1) >> >>> db(q.as_dict(flat=True)).select() >> File "", line unknown >> SyntaxError: Operator not supported: eq >> >> That is in a web2py shell,i mea

[web2py] Re: Pass a query from form to another function

2018-04-10 Thread Dave S
On Tuesday, April 10, 2018 at 3:14:06 PM UTC-7, Yoel Benitez Fonseca wrote: > > Is this not working any more ? > > >>> q = (db.photo.id == 1) > >>> db(q.as_dict(flat=True)).select() > File "", line unknown > SyntaxError: Operator not supported: eq > > That is in a web2py shell,i mean is the sam

[web2py] Re: Pass a query from form to another function

2018-04-10 Thread Yoel Benitez Fonseca
Is this not working any more ? >>> q = (db.photo.id == 1) >>> db(q.as_dict(flat=True)).select() File "", line unknown SyntaxError: Operator not supported: eq That is in a web2py shell,i mean is the same thing passing around the query in the session as a dict, is not ? El miércoles, 7 de dicie

[web2py] Re: How could I create a validator to show the field based on the membership?

2018-04-10 Thread greenpoise
thanks! On Thursday, March 29, 2018 at 5:31:51 PM UTC-7, 黄祥 wrote: > > *pls try (not tested)* > has_membership_admin = 'Admin' in set(auth.user_groups.values() ) > db.table.field.readable = has_membership_admin > or > has_membership_admin = 'Admin' in set(auth.user_groups.values() ) > db.table.fi