Turbogears migration: flash messages

Alessandro Molina alessandro.molina at gmail.com
Mon Feb 29 20:35:07 UTC 2016


On Mon, Feb 29, 2016 at 8:02 PM, Thomas De Schampheleire <
patrickdepinguin at gmail.com> wrote:

> Hello Alessandro,
>
> In parallel with making the test framework work under Turbogears, I
> also had a look at flash messages. Currently, we were using the Flash
> class from webhelpers.pylonslib.
>
> I noticed that Turbogears2 has a TGFlash class, and tried to use it.
> However, while I could store and retrieve a single flash message, I
> could not retrieve multiple ones. Only the last one would be shown.


Yes, I know, TG2 builtin flash doesn't support multiple messages.
There is an open issue for that https://github.com/TurboGears/tg2/issues/53

As TG provides support for both JS and html flash messages ( see
http://turbogears.readthedocs.org/en/latest/turbogears/webflash.html#custom-flash-javascript
) it would require to add support for multiple messages in both and as it
wasn't an high priority it has always been left on todo list. Especially
since there was a tgext.flash for people needing multipel flash messages ->
https://github.com/moschlar/tgext.flash (never tried it myself by the way).

Adding multiple flash messages in TG itself is not really hard, the most
complex part is doing it while retaining backward compatibility with people
that provided custom flash messages :D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20160229/40fb66c6/attachment.html>


More information about the kallithea-general mailing list