jinja2 to print doesn't exist Variables

11 views
Skip to first unread message

李余通

unread,
Aug 15, 2017, 9:31:41 PM8/15/17
to Django users
Hello every:
http://jinja.pocoo.org/docs/2.9/templates/#variables
In Django template language:
if {{ var }} doesn't exist,it will print nothing,the jinja2's document said it will print noting default,however it print "{{ var }}"?how to change it to noting whithout chang tags "{{ var }}".
ps : {{ var|default("") }} will print nothing,but it is too long .
Thank you!
Reply all
Reply to author
Forward
0 new messages