I looked at record versioning, but, if I use something like: db.mytable._before_update then when the _before_update function is called, no changes have been made to the database yet. So to get the old value of the field, it seems like I need to read the current database row that is about to be updated, (unless web2py has this data cached somewhere already). Then I can compare the old field value to the value about to be written to see if it is changing.
On Wednesday, October 9, 2013 3:25:07 PM UTC-10, 黄祥 wrote: > > had you already take a look record versioning? > > taken from book : > Record versioning > _enable_record_versioning > > It is possible to ask web2py to save every copy of a record when the > record is individually modified. > > so if you combine record versioning, auth signature that have modified > date field with before and after callback (to compare the archieve table > with the original one), i think you can get what you want. > > 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.