[Grok-dev] what is grok.View.flash()?

Douglas Cerna douglascerna at yahoo.com
Thu Jan 8 12:47:27 EST 2009


Brandon:

I used that method long before. It's used together with the z3c.flashmessage package. It allows you to say in a view:

def save(self, **data):
    # save changes here
    self.flash(u"Your changes were saved")
    self.redirect(url)

Then in the next page you could do:

<div class="notification" tal:content="context/@@message">
  notification goes here
</div>

I remember it was context/@@message, but I'm not sure. I think this functionality is used in the grok admin page when you add or delete an application..

I hope this helps.

Regards, Douglas

Douglas

"... allí­ es cuando te das cuenta que las cosas malas pueden resultar bastante buenas..." - Lionel Messi



      



More information about the Grok-dev mailing list