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
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.
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
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,
thanks to you both!
5 matches
Mail list logo