[web2py] Re: How to display Users who are not admins

2012-09-12 Thread Frederick Yankowski
I haven't noticed the _select() nested-select method before.  Interesting.


On Tuesday, September 11, 2012 4:45:04 PM UTC-5, Massimo Di Pierro wrote:

 rows = 
 db(~db.auth_user.id.belongs(db(db.auth_membership.group_id==auth.id_group('admins'))._select(db.auth_membership.user_id,distinct=True))).select(db.auth_user.ALL)




-- 





[web2py] Re: How to display Users who are not admins

2012-09-12 Thread Anthony
On Wednesday, September 12, 2012 2:34:28 PM UTC-4, Frederick Yankowski 
wrote:

 I haven't noticed the _select() nested-select method before.  Interesting.


http://web2py.com/books/default/chapter/29/06#belongs

-- 





[web2py] Re: How to display Users who are not admins

2012-09-11 Thread Massimo Di Pierro
Try:

rows = 
db(~db.auth_user.id.belongs(db(db.auth_membership.group_id==auth.id_group('admins'))._select(db.auth_membership.user_id,distinct=True))).select(db.auth_user.ALL)

On Tuesday, 11 September 2012 12:55:31 UTC-5, Cler wrote:

 How to display the members who are not admins ( They dont belong to the 
 group admins)


--