ok, I hacked an after_update attribute in sql.py but I am doing this: db.table.field.after_update = a_list_with_functions
I think it feels more natural. What do you guys think? On Nov 3, 10:58 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: > after_update should be a list of functions, that take one argument, the row. > > db.table.field.after_update.append(lambda row: print row) > > -Thadeus > > On Tue, Nov 3, 2009 at 2:56 PM, Jon Romero <darks...@gmail.com> wrote: > > > Is it possible to do something like that in the db declarations or I > > have to put code inside the controller? > > For example in Rails you specify functions that will run before or > > after an insert/update/delete/select inside the declaration of model. > > That makes the code very easy to read/reuse. > > > I think that it is easy to do this in web2py if you put something like > > that: > > db.table_name.table_field.after_update = function_do_something > > > Any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---