[web2py] Re: "belongs" statement for grid

2015-03-02 Thread Niphlod
On Monday, March 2, 2015 at 5:57:30 AM UTC+1, Alex Glaros wrote: > > works perfect Niphlod, > > 1. is underscore var name preferable to camel case in w2py? > nope. the way you named it though revealed a lot on the "shortcircuits" > > 2. is there any difference between .select and ._select? (i

[web2py] Re: "belongs" statement for grid

2015-03-01 Thread Alex Glaros
works perfect Niphlod, 1. is underscore var name preferable to camel case in w2py? 2. is there any difference between .select and ._select? (in my data, works the same) working code example: doNotDisplayThisPersonQuery = db(( db.auth_user.id == db.BlockedConnection. blockingPerson) & (db.Block

[web2py] Re: "belongs" statement for grid

2015-03-01 Thread Niphlod
there's a bit of short-circuit in this. small recap: - SQLFORM.grid() takes a query, i.e. db(set), i.e. just what you'd like to display without the .select() part - belongs() is a method to build up a condition, that takes either a list of values, or a subselect, i.e. a full db(set).select(t