Re: [web2py] Re: Subclassing IS_IN_SET - one piece missing.

2014-12-02 Thread Andrew Buchan
That works perfectly, thanks Niphlod! On Mon, Dec 1, 2014 at 8:54 PM, Niphlod niph...@gmail.com wrote: why reinventing the wheel ? IS_IN_DB takes a Set... gr = db.auth_group me = db.auth_membership us = db.auth_user theset = db( (us.id == me.user_id) (gr.id == me.group_id)

[web2py] Re: Subclassing IS_IN_SET - one piece missing.

2014-12-01 Thread Niphlod
why reinventing the wheel ? IS_IN_DB takes a Set... gr = db.auth_group me = db.auth_membership us = db.auth_user theset = db( (us.id == me.user_id) (gr.id == me.group_id) (gr.role == 'roletest') ) Field('a_field', requires=IS_IN_DB(theset, 'auth_user.id', '%(first_name)s -