I am looking for a django setting or programmatic way to make all django template tags show the empty string when the value is None. For example, imagine that I have some django
"Explicit is better than implicit"
Think of how enraged you would be when things wouldn't render properly because you forgot that you had enabled the magic "render everything with a false value as a null string" setting.
If you find you're using the default_if_none
filter a lot, you might want to consider changing casting None
to ''
BEFORE it's passed to the template.
Your template will be simpler, and you will have explicitly made this decision to stringify null values.