{# Reusable table macro: render a list of records (dicts) as an HTML table. Keys of the first record become the column headings; numeric cells are right- aligned. Used for every tabular section of the report, so one definition serves both the contents list and the revisions data. #} {% macro render_table(rows, caption=None) -%} {% if rows %}
| {{ key }} | {% endfor %}
|---|
| {{ value if value is not none else "" }} | {% endfor %}
No data.
{% endif %} {%- endmacro %}