a, i c, my assumption is whatever showed in snakeviz result, is all the 
python files that executed, btw, there still odd for me, why login_onfail 
callback function is not showed snakeviz, wheter it's executed or defined?

*an error traceback for IS_IN_DB() is :*
requires_person = IS_IN_DB(current.db, current.db.person.id, 
current.db.person._format)
AttributeError: 'thread._local' object has no attribute 'db'

fixed by put it on function, at first i just define it as is
requires_person = IS_IN_DB(current.db, current.db.person.id, 
current.db.person._format) # error
because another requires is not error when defined as is:
*e.g.*
*modules/test_field_constructor.py*
requires_marital_status = IS_IN_SET([('Single', current.T('Single') ), 
('Married', current.T('Married') ), 
('Divorced', current.T('Divorced') ) ], 
zero = current.T('Choose One') )

# not error
def requires_person(has_membership_admin, auth_user_person):
return IS_IN_DB(current.db if has_membership_admin else 
current.db(current.db.person.id == auth_user_person.id), 
current.db.person.id, current.db.person._format)

thx anthony for detail explaination

best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to