turbogears.flash.info("An informational message...")
turbogears.flash.error("A big freakin' error!")

That's a nice syntax.

Indeed.  My fancy Kid template uses the following syntax:

turbogears.flash("An informational message...")
turbogears.flash("error::Quite the error!")
turbogears.flash("warning::Warning.")
turbogears.flash("success::Congratulations!")

I like having full control over the name of the CSS class used. I can basically have an unlimited number of different statuses, rather than having to make-do with someone's pre-conceived notion of what should be allowable - i.e. info, error, and warn.

I.e. class::Label::message formatting:

turbogears.flash("acc-create-success::Success::Congratulations, you have successfully joined. Check your e-mail for activation information.")

Then I can have decorative iconography implemented in CSS.

Matthew Bevan, Systems Administrator
Top Floor Computer Systems Ltd.


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to