For a school admin database, different roles for logged in users:  admin, 
teachers and staff.  I can use using auth_group and auth_membership to 
define these roles.

I have the following table:

db.define_table( "class", Field("teacher_id", db.auth_user), ...)

want a form to create a new class, very nice that web2py will done most of 
the work of creating a form with drop-down list of auth_users for the 
"teacher_id" field.  However, I don't want the whole list of auth_users, I 
would like the list to be filtered to only show users with "teacher" role.

I think using the _and=IS_IN_DB() to get the subset, not quite sure how to 
write it.

Another option is to create a DB View, cannot find out how web2py works 
with DB views.

-- 



Reply via email to