if elif in jinja2 code example
Example 1: jinja if else
{% if "error" in RepoOutput[RepoName.index(repo)] %}
{{ RepoOutput[RepoName.index(repo)] }} |
{% elif "Already" in RepoOutput[RepoName.index(repo) %}
{{ RepoOutput[RepoName.index(repo)] }} |
{% else %}
{{ RepoOutput[RepoName.index(repo)] }} |
{% endif %}
Example 2: jinja if else
{% if "Already" in RepoOutput[RepoName.index(repo)] %}
{% set row_class = "good" %}
{% else %}
{% set row_class = "error" %}
{% endif %}
{{ RepoOutput[RepoName.index(repo)] }} |