From: Evan Broder Date: Sat, 27 Mar 2010 22:39:57 +0000 (-0400) Subject: Be sure flash messages are strings before displaying them. X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=8b1499d9b2f38ae41123d394229418acf1cbde88;p=bluechips.git Be sure flash messages are strings before displaying them. It seems that at least some recent versions of Mako don't convert objects to strings before attempting to render them, leading to a TypeError for things like flash messages, which are no objects and not just strings. Reported-by: João Felipe Santos --- diff --git a/bluechips/templates/base.mako b/bluechips/templates/base.mako index fe328ad..5e5feb0 100644 --- a/bluechips/templates/base.mako +++ b/bluechips/templates/base.mako @@ -62,7 +62,7 @@ % for message in h.flash.pop_messages(): -
${message | n}
+
${str(message) | n}
% endfor
${next.body()}