<%inherit file="/page.mako" /> % for e in exps: % if len(exps) > 1:

${get_d(e)}

% endif % for c in e.catexps: ${c.cat.name} ${c.expense}
% endfor Constant: ${e.const}
In Summa: ${e.sum}

% endfor <%def name="heading()"> % if len(exps) > 1: Current expenses % else: Expenses for ${get_d(exps[0])} % endif <%def name="get_d(e)"> ${e.date.year}/${e.date.month}