simple http frontend

This commit is contained in:
Christophe Benz 2010-03-29 13:24:13 +02:00 committed by Christophe Benz
commit 8ece426999
4 changed files with 108 additions and 0 deletions

View file

@ -0,0 +1,16 @@
## -*- coding: utf-8 -*-
<%def name="title()" filter="trim">
weboob
</%def>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>${self.title()}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
${next.body()}
</body>
</html>

View file

@ -0,0 +1,9 @@
## -*- coding: utf-8 -*-
<%inherit file="base.mako"/>
<%def name="body()">
<ul>
<li><a href="/messages">Messages</a>
</ul>
</%def>

View file

@ -0,0 +1,21 @@
## -*- coding: utf-8 -*-
<%inherit file="base.mako"/>
<%def name="title()" filter="trim">
weboob / messages
</%def>
<%def name="body()">
% for (name, backend) in backends:
<h1>${name}</h1>
<ul>
% for message in backend.iter_messages():
<li>
${message.get_title()}
<p>${message.get_content()[:80]}</p>
</li>
% endfor
</ul>
% endfor
</%def>