A feature of jinja that I just discovered is including sub templates. Here is an example from the docs.
{% include 'header.html' %} Body goes here. {% include 'footer.html' %}
And inside of my thoughts project I used it to render posts.
<ul id='posts'> {% for post in posts.__root__ %} {% include 'post_item.html' %} {% endfor %} </ul>
note that post_item.html automatically inherits the post variable.