[web2py] Re: strange behaviour in after_insert callback

2016-04-22 Thread 黄祥
k, got it, thank you so much 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

[web2py] Re: strange behaviour in after_insert callback

2016-04-22 Thread Anthony
You are right. It is not documented, but with _after_insert, the f.fieldname notation does work with a regular insert but not with bulk_insert. It also does not work with _before_insert. I'm not sure why the inconsistency, but it is probably best to stick with the documented method using

[web2py] Re: strange behaviour in after_insert callback

2016-04-21 Thread 黄祥
yes, you all right, in the past i learned the after_insert callback can be access via f.amount, yet it still work when using insert, but not bulk_insert (must use dict f['amount'] ), please correct me if i'm wrong about my conclusion thanks and best regards, stifan On Thursday, April 21, 2016

[web2py] Re: strange behaviour in after_insert callback

2016-04-21 Thread Anthony
On Thursday, April 21, 2016 at 1:57:20 AM UTC-4, 黄祥 wrote: > > meet strange behaviour in after_insert callback, when using variable (e.g. > f.amount) is not work, but when using dict (e.g. f['amount'] ) work > models/db_wizard_4_subscription.py > # not work > def

[web2py] Re: strange behaviour in after_insert callback

2016-04-21 Thread Niphlod
tried with f['amount']yet ? On Thursday, April 21, 2016 at 7:57:20 AM UTC+2, 黄祥 wrote: > > meet strange behaviour in after_insert callback, when using variable (e.g. > f.amount) is not work, but when using dict (e.g. f['amount'] ) work > models/db_wizard_4_subscription.py > # not work > def