>
> I've tried your suggestion and worked!. At 'before_update' stored old 
> values in request.vars using Set object, then at 'after_update' access 
> these values and compare to the new ones at f.
>

Be careful about storing something in request.vars, as some other code may 
depend on request.vars and end up failing due to it being changed.
 

> Note: if you use 'detect_record_change=True' it seems 'before_update' is 
> called twice, though it doesn't matter in my case.
>

That doesn't sound right. Can you figure out where that is happening? Do 
you have an onchange callback that does an update on a change? Does your 
before_update callback return a non-falsey value in that case (that's the 
only reason the before_update callback would fire without being followed by 
an update and then the after_update callback)? Do you have record 
versioning enabled?

Anthony

-- 
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