Except from being less verbose, how is this different from calling somefunc under form.accepts?
form=SQLFORM(...) # create, update or delete if form.accepts(...): somefunc(...) On Apr 8, 5:34 am, Ishbir <ishbi...@gmail.com> wrote: > The way that you are doing it in crud, do the same way in DAL. The > only difference that create_onaccept function will be called if > db.table.insert() is called whether directly or indirectly (via a crud > form for e.g.) and the same applies for update and delete. > > In db.py, it could be something like- > > db.table.create_onaccept = somefunc > > where somefuc is a function in the form of- > > def somefunc(record_inserted): > # increment/decrement something here > pass > > What do you think? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@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.