I will close that issues because now web2py has _before and _after hooks:
db.table._before_insert.append(lambda fields: None)
db.table._before_update.append(lambda query,fields: None)
db.table._before_delete.append(lambda query: None)
db.table._after_insert.append(lambda fields: None)
db.table._after_update.append(lambda query,fields: None)
db.table._after_delete.append(lambda query: None)
there is a very simple way to add auditing to any table. We are discussing
on web2py-developer what the best way is.
Massimo
On Tuesday, 20 March 2012 13:41:42 UTC-5, nick name wrote:
>
> On Tuesday, March 20, 2012 2:30:08 PM UTC-4, Rick Ree wrote:
>>
>> In case anyone else is using this, I found that 1.99.7 requires a change
>> at line 78:
>>
>> #rows = self.select(query, ['id'], {})
>> rows = self.select(query, [table['id']], {})
>>
>
> Please note that there is a ticket tracking this (with interesting
> changes):
>
> Issue 354 <http://code.google.com/p/web2py/issues/detail?id=354>: Database
> audit implementation / generalized web2py+dal triggers
>
> I am adding your text as a comment there and a link back here.
>