How to make a variable in jijna2 default to \"\" if object is None instead of doing something like this?
{% if p %} {{ p.User[\'first_name\'
According to docs you can just do:
{{ p|default('', true) }}
Cause None casts to False in boolean context.
None
False
Update: As lindes mentioned, it works only for simple data types.