{% if cond %}
This is not HTML. It's Jinja2 template logic.
It means "If the variable cond exists and is not empty, render the
following HTML."
if cond=None || cond=""
then it becomes false
else
true
{{ ... }}
Print value inside
Code Example
Script to render page.html using base.html
|
base.html (template)
|
Page extending the template
|
|