On 4/11/06, Max Ischenko <[EMAIL PROTECTED]> wrote: > > In current turbogears trunk turbogears.flash() function works a bit > > inconsistently: flash message is displayed only on next request after a > > message was set. This is because flash message is implemented via > > cookies and cookie is not accessible on the same request (before it is > > sent to client). > > That's a feature. > > This is the way it is to be able to display flash after issuing a redirect.
I'm fully aware of this feature and I'm not proposing to remove it. I am proposing to add another feature to be able to display flash by not issuing redirect. This way, when program issues redirect after setting flash, it (flash) will be loaded from cookies. When program renders template after setting flash, it will be loaded from cherrypy.response or cherrypy.request. Actually I'm going to apply patch http://trac.turbogears.org/turbogears/attachment/ticket/297/%23297patch.diff (thanks for the link, Michele) but leave cookie stuff in place. This way turbogears.flash() would work as [uninformed] users expects it to (at least as I expected it to work when I was unaware of how flash actually works under the hood). -- Andrey Lebedev Software engineer --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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/turbogears-trunk -~----------~----~----~----~------~----~------~--~---
