Question

Im trying to render a HTML Table based on a dictionary that I get..The dictionary has 3 items..When I loop through for loop the 1st item is recognized part of the table..The 2nd and 3rd row is not recognized part of the table..

What could the problem?

<html>
<head>
</head>
<body>
<table border="1">

<tr>
    <col width="100">
    <col width="100">
    <col width="100">
    <col width="100">
    <th>NAME</th>
    <th>FEEDBACK</th>
    <th>RATING</th>
    <th>DATE</th>
</tr>

%for row in feedbacks:
        <tr>
         <td>    {{ row['name']     }}      </td>
         <td>    {{ row['feedback'] }}      </td>
         <td>    {{ row['rating']   }}      </td>
         <td>    {{ row['date']     }}      </td>
        </tr>


</table>

</body>
</html>
Was it helpful?

Solution

I am not familiar with Bottle, but is seems that you should end your %for loop.

Maybe something along the lines of %end

edit: I am surprised it would not give you some sort of template error though. That is how Flask and Django work. You labelled your post as Django, but I am pretty sure this is no django.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top