[web2py] Re: Is it possible to intercept the flash message and parse it before appearing to the view?

2011-12-05 Thread Anthony
The flash message is stored in response.flash. There are a few web2py operations that automatically set that. The actually flashing is handled by JS on the client side (in web2py_ajax.js). Anthony On Monday, December 5, 2011 11:32:22 AM UTC-5, Constantine Vasil wrote: I made a flash messages

[web2py] Re: Is it possible to intercept the flash message and parse it before appearing to the view?

2011-12-05 Thread Constantine Vasil
OK but I want to intercept it before actual flash is done, I want to format my flash code on the layout.html before flash to appear.

[web2py] Re: Is it possible to intercept the flash message and parse it before appearing to the view?

2011-12-05 Thread Massimo Di Pierro
In your action before return you can access it in response.flash If your action before redirect you can access it in session.flash You have to do both. Alternatively, you can access response.flash in the view, before {{extend...}} On Dec 5, 11:56 am, Constantine Vasil

[web2py] Re: Is it possible to intercept the flash message and parse it before appearing to the view?

2011-12-05 Thread Anthony
The default layout.html includes: div class=flash{{=response.flash or ''}}/div and there is some CSS that controls how it looks, and some code in web2py_ajax.js controlling its display. You could add some code there, or in the controller that generates the response.flash. Anthony On Monday,

[web2py] Re: Is it possible to intercept the flash message and parse it before appearing to the view?

2011-12-05 Thread Constantine Vasil
thanks to you both!