comparison zpt/HTML_table.zpt @ 2:61a3764cd5fb

new version RestDbInterface with working traversal and templates
author casties
date Fri, 21 May 2010 11:48:30 +0000
parents
children 0e2d167d0983
comparison
equal deleted inserted replaced
1:48de7c260ffe 2:61a3764cd5fb
1 <html tal:define="format python:request.get('format','table'); fields options/data/names">
2 <head>
3 <title tal:content="template/title">The title</title>
4 <meta http-equiv="content-type" content="text/html;charset=utf-8">
5 </head>
6 <body>
7 <h2>table <span tal:replace="options/tablename"/></h2>
8 <tal:block tal:condition="python:format=='table'">
9 <table id="table">
10 <tr>
11 <th tal:repeat="field fields" tal:content="field"/>
12 </tr>
13 <tr tal:repeat="row options/data">
14 <td tal:repeat="field fields" tal:content="python:row[field]"/>
15 </tr>
16 </table>
17 </tal:block>
18 </body>
19 </html>