I'm using flashes successfully using 'simple' renderings like:
def index(self):
self.session.add_flash('Some message')
self.render_response('index.html')
but when I use it in combination with a redirect the flashes seem to get lost, e.g.
def save(self):
# do stuff
self.session.add_flash('Some message')
self.redirect_to('some_template')
I'm using Jinja2 and are providing the flashes to the templates as follows:
def render_response(self, _template, **context):
ctx = {
'flashes': self.session.get_flashes(),
'session': self.session
}
ctx.update(context)
rv = self.jinja2.render_template(_template, **ctx)
self.response.write(rv)
Am I doing something wrong or are flashes not supported with redirects?
Cheers,
Marcel