<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

    <title>The title of the report</title>
</head>
<body>
This report has been generated by <b>python</b> in live at {{ a_date }}.<br>
It integrates numbers too : {{a_number}}, {{another_number}}.<br>
as well as a date : {{ a_date }}<br>
and a string : {{ a_str }}<br>
<br>
<h2>The book</h2>
This report is based on the book stored at '{{ book_url }}'<br>
It has the following KVP:<br>
<table border="1">
    <tr>
        <th>key</th>
        <th>value</th>
    </tr>
    {% for (k,v) in b.iteritems() %}
    <tr>
        <td>{{ k }}</td>
        <td>{{ v.value }}</td>
    </tr>
    {% endfor %}

</table>
<br>
The book has the following accounts<br>
<table border="1">
    <tr>
        <td> in a tree</td>
        <td>or a list (with KVP values)</td>
    </tr>
    <tr>
        <td>
            <ul>
                {% for acc in b.root_account.children recursive %}
                <li>{{ acc.name }}</li>
                {% if acc.children %}
                <ul>
                    {{ loop(acc.children) }}
                </ul>
                {% endif %}
                {% endfor %}
            </ul>
        </td>
        <td>
            <ul>
                {% for acc in b.accounts %}
                <li>{{ acc.fullname }} => {% for (k,v) in acc.iteritems() %} {{ (k,v.value) }} {% endfor %}</li>
                {% endfor %}
            </ul>
        </td>
    </tr>
</table>
<br>
<hr>

Have fun customising this report (available at '{{path_report}}')!
</body>
</html>