2011/12/20 Franck <franck.pe...@gmail.com>: > Hi, > > I'd like to register an action (i.e. sending some message) in a POST method > that should be executed only if the HTTP request ultimately succeeds (i.e. > if all application processors do their job without error). > > I'm thinking of declaring my actions in web.ctx and use an unload hook > similar to : > > def my_unloadhook(): > """ Runs all actions registered in web.ctx.registered_actions if > web.ctx.status is 200 """ > > Is it a good approach ?
Looks good to me. Anand -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to webpy@googlegroups.com. To unsubscribe from this group, send email to webpy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.