I am having running into an issue using flask framework to generate some html pages using a template (this is my first using Flask or any framework for that matter)
I am calling the template using the usual render_template call
return render_template("index.html", rec_list = rs_rec_list, type_list = rs_type_list)
rs_rec_list and rs_type_list being in the standard python list format
My template then has the following section of code:
<div class = "new_record_column">
<div class="leftcolumn">
<div class="new_record_header">
ADD NEW RECORD
</div>
<div class="new_record_container">
<label for "refnum">Ref No. </label> 
<input type="text" id="refnum" size="30">    
<select id="rec_type">
{% for type_item in type_list %}
<option value = loop.index> {{type_item}} </option>
{% endfor %}
</select>    
<button>GO</button>
</div>
</div>
</div>
<table>
<tr>
<th>Reference No.</th>
<th>Header 1</th>
<th>Header 2</th>
<th>Type</th>
<th>Operator</th>
<th>Comments</th>
<th>Date/time</th>
</tr>
<tr>
{% for rec_item in rec_list %}
<td> {{rec_item}} </td>
{% endfor %}
</tr>
</table>
The issue I am having is that the first for loop that populates the select list works as it should, but the second for loop that populates the columns in the table, doesn't seem to do anything. I am pretty sure this is obvious, but I have probably been staring at it too long now to see it :)