4

I want to jinja to output an empty string if the value is None but with no further changes to the template. I see no reason why it should output "None" to an end user, I think it's just bad design. There are many solutions to make it work by changing the template like this, but I don't want to change the templates.

Is there any way to do this / hack jinja to make it work?

Community
  • 1
  • 1
duality_
  • 17,738
  • 23
  • 77
  • 95
  • Have a look at this thread : https://stackoverflow.com/questions/2695180/jinja2-returns-none-string-for-google-app-engine-models – Arnaud May 13 '14 at 08:04
  • possible duplicate of [Suppress "None" output as string in Jinja2](http://stackoverflow.com/questions/11146619/suppress-none-output-as-string-in-jinja2) – OJFord Sep 01 '14 at 18:36

0 Answers0