parse_py / templates /results.html
broadfield-dev's picture
Create templates/results.html
83b1ba1 verified
raw
history blame
998 Bytes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Parsed Python File</title>
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
border: 1px solid black;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<h1>Parsed Python File</h1>
<table>
<tr>
<th>Part</th>
<th>Category</th>
<th>Location</th>
<th>Source</th>
</tr>
{% for i, part in enumerate(parts, 1) %}
<tr>
<td>{{ i }}</td>
<td>{{ part.category }}</td>
<td>Lines {{ part.location[0] }} to {{ part.location[1] }}</td>
<td><pre>{{ part.source }}</pre></td>
</tr>
{% endfor %}
</table>
</body>
</html>