[Flask] Jinja environment finalize function

S McGraw smcg4191 at mtneva.com
Thu Oct 1 07:15:44 CEST 2015


Jinja allows one to initialize an environment with a 
"finalize" callable, which I want to do to convert None's
to empty strings before they are output.  This is much 
cleaner than than filling my templates with innumerable
"if none ..." constructs.

But I don't see in the Flask docs how to do this.  
Suggestions?


More information about the Flask mailing list