On 7/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> And here are some bugs I've investigated:
>
> 1. unknown links didn't dispatch to 'default' method
> 2. pylons 'c', 'g' params need to be returned implicitly (return
> dict(c=c, g=g))
> 3. need implement tg_flash
FWIW, here is the implementation I used in my Pylons project:
def flash(message, *args):
"""
Preserve a message to be shown to the user after redirect.
Inspired on TurboGear's flash function but implemented via session
instead of cookies.
"""
if args:
message = message % args
session['page_message'] = message
session.save()
And BaseController.__call__:
if session.has_key('page_message'):
c.page_message = session.pop('page_message')
session.save()
As you see it's not cookie-based, alas, but at least it was easy to
implement. ;)
Max.
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---