Since ticket 201 will be probably resolved for 0.9.5 and for those
that find reading patches hard... this is what will be possible with
0.9.5 ...
This is a sollution for the cookie based "show message after
redirect":
def __before__(self):
c.message = request.cookies.get('xxx_message', None)
def __after__(self):
if c.message:
self.response.delete_cookie('xxx_message')
if hasattr(self, 'message'):
self.response.set_cookie('xxx_message', self.message)
def demo(self):
self.message = 'Redirected from demo'
redirect_to('/')
setting self.message in any action, and then calling redirect_to() ..
the redirect response will be avaialble in __after__ .. so __after__
sets the message in a cookie. It also deletes the previuos cookie.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---