How to make jijna2's default variable "" if the object is None and not something like this?
{% if p %} {{ p.User['first_name']}} {% else %} NONE {%endif %}
So, if the p object is None, I want the default values โโof p (first_name and last_name) to be "". Basically nvl (p.User [first_name '], "")
Error while receiving: Error: jinja2.exceptions.UndefinedError UndefinedError: "None" does not have the attribute "User"
jinja2
mcd Oct 27 '13 at 2:31 on 2013-10-27 02:31
source share