/table_contents funktioniert jetzt!
This commit is contained in:
33
slaeforms/templates/table_contents.html
Normal file
33
slaeforms/templates/table_contents.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles.css')}}" />
|
||||
<title>Database Tables</title>
|
||||
<link rel="shortcut icon" href="{{ url_for('static', filename='icons/favicon.ico') }}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Database Tables</h1>
|
||||
{% for table_name, contents in table_contents.items() %}
|
||||
<h2>{{table_name}}</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
{% for column in contents['columns'] %}
|
||||
<th>{{column}}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in contents['rows'] %}
|
||||
<tr>
|
||||
{% for column in contents['columns'] %}
|
||||
<td>{{row[column]}}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user