Hello,
while I'm working with Jinja2 I noticed, that Twig (a PHP templating
engine) uses virtually the same template syntax, but additionally offers
a handy feature in case a list of a for-loop doesn't contain any entries:
{% for user in users %}
* {{ user.name }}
{% else %}
No user have been found.
{% endfor %}
How is it supposed to be done in Jinja2? At least the documentation
doesn't mention an else-directive for the for-loop. An outer
if-condition would probably work, but wouldn't look very elegant.
Kind regards
Marten