perhaps an example can make it clear
e.g.
def __after_insert_auth_user(f, id):
db.profile.insert(username = f.username, first_name = f.first_name, 
last_name = f.last_name, email = f.email)

def __after_update_auth_user(s, f):
auth_user = s.select().first()
db(db.profile.auth_user == auth_user.id).update(username = 
auth_user.username, 
first_name = auth_user.first_name, 
last_name = auth_user.last_name, 
email = auth_user.email)

# check condition if install controller (can't face bulk_insert in install 
controller with insert callback) 
if 'install' not in request.controller :
db.auth_user._after_insert.append(__after_insert_auth_user)
db.auth_user._after_update.append(__after_update_auth_user)

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