added events to the templates

This commit is contained in:
Marcus "Chaosblog 2012-02-24 14:13:24 +01:00
parent 76fc4ca594
commit bf023c2ea9
3 changed files with 3 additions and 1 deletions

View File

@ -122,6 +122,7 @@ def render_template(path, week=None, **kwargs):
week=week, week_start=week_start,week_end=week_end,
good=good, lame=lame, skip=skip, userlist=userlist,
pool=(get_balance('Pool')-get_balance('Event')), paid=get_balance('Pool:Paid'),
event=get_balance('Pool:Event'),
debts=debts, **kwargs)
if __name__ == '__main__':

View File

@ -26,7 +26,7 @@ Beer pool:
This week: € ${5 * len(lame)}
Total: € ${pool}
Paid: € ${paid}
Events: € ${event}
Individual debts:
% for (u, v) in sorted(debts, key=lambda p:p[1], reverse=True):
${u"%20s %d \u20AC" % (u, v)}

View File

@ -43,6 +43,7 @@ Results for week beginning ${week_start.strftime("%F")}
<tr> <td> This week: </td> <td> &euro; ${5 * len(lame)} </td> </tr>
<tr> <td> Total: </td> <td> &euro; ${pool} </td> </tr>
<tr> <td> Paid: </td> <td> &euro; ${paid} </td> </tr>
<tr> <td> Events: </td> <td> &euro; ${event} </td> </tr>
</table>
<h2>Debts:</h2>