Le vendredi 9 mars 2012 23:48:30 UTC+1, rochacbruno a écrit :
>
> To do what Django does we need to have some "hooks' for that 3 events 
>> (dbset.insert, dbsert.update and Row.update_record)
>>
>> I can see that if you extend DAL it is possible to redefine via monkey 
>> patching the .insert method.
>>
>> But it will be very better if DAL can handle this out of the box.
>>
>> A suggestions is adding an "callback" in .insert method
>>
>> def myfunction(id):
>>     .....
>>
>> db(db...).insert(**....., _callback=myfunction)
>>
>> But I dont know if it is possible...
>
>
I posted "Issue 354 <http://code.google.com/p/web2py/issues/detail?id=354>: 
Database 
audit implementation / generalized web2py+dal triggers " a while ago (using 
monkey patching). I'm no longer maintaining that patch, but if anyone wants 
to revive it, this is a reasonable start.

Reply via email to