Смены:
-
{% for s in shiftdb %}
- {{ s.title }} {% endfor %}
Домики:
-
{% for h in housedb %}
- {{ h.title }} {% endfor %}
Фото:
{% with photos_dir, thumbs_dir = html_dirs(0) %} {% with photos = listdir(post_dirs(0)[0])[:4] %}
{% for p in photos %}
{% with last = (loop.index == 4) %}
{% endwith %}
{% endwith %}
{% if last %}
{% endwith %}
{% endfor %}
Ещё
{% endif %}