Re: Template variable when None displays None

2007-07-11 Thread Nathan Ostgard
It's the default behavior of Python: >>> str(None) 'None' I don't agree that it should be the default. None and "" are two distinct values -- especially with a database. In databases, None (or NULL) normally represents a _missing_ value, whereas a "" is one that was intentionally specified to

Re: Template variable when None displays None

2007-07-11 Thread Rand Bradley
The default_if_none filter was not working when I tried it the first time, but I retried it after your post and it is working so this may solve my issue. Is that the designed behavior template variables? If the value is None, display the word "None"? So someone has to use the default_if_none

RE: Template variable when None displays None

2007-07-11 Thread Chris Brand
When a template variable value is None, is it expected to render the word 'None'? I would expect this to fail silently instead of displaying the word. Is there a configuration setting or some way to change the default rendering? Do I have to wrap variables with an {% if ... %} in order to not