On Jul 19, 7:17 am, 陶艺夫 <[email protected]> wrote:
> Why all response's messages have to be sent to response.flash? I have a
> message bar in the view where I get the messages by using
> {{response.message}} which will disapear in 3 seconds.

They don't - I use response.error, response.warning,
response.confirmation & response.information to provide different
styling via CSS.

In order to be able to have these work after a redirect, hence using
session.* instead, this requires patching the session in the model:
def myapp_sessions(f):
    response.error = session.error
    response.confirmation = session.confirmation
    response.warning = session.warning
    session.error = []
    session.confirmation = []
    session.warning = []
    return f()
response._caller = lambda f: myapp_sessions(f)

F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to