simple http frontend
This commit is contained in:
parent
1c035761a8
commit
8ece426999
4 changed files with 108 additions and 0 deletions
16
weboob/frontends/http/templates/base.mako
Normal file
16
weboob/frontends/http/templates/base.mako
Normal 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>
|
||||
9
weboob/frontends/http/templates/index.mako
Normal file
9
weboob/frontends/http/templates/index.mako
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
|
||||
<%inherit file="base.mako"/>
|
||||
|
||||
<%def name="body()">
|
||||
<ul>
|
||||
<li><a href="/messages">Messages</a>
|
||||
</ul>
|
||||
</%def>
|
||||
21
weboob/frontends/http/templates/messages.mako
Normal file
21
weboob/frontends/http/templates/messages.mako
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue