mardi 8 décembre 2015

Flask - can I iterate in flask using an if statement?

I have a csv file containing different bits of data, on my website I want to display this but only if it has been confirmed (each bit of data has a 1 or a 0 1 being confirmed 0 being not)

I need to iterate through to collect all the ones to then display on my site (using html 5) but I have no idea on how? any help would be great!

The only way I know how to display it is with this

<table>
    {% for aDate in bookingList %}
    <tr>        
        {% for item in aDate%}
        <td>
            {{item}}
        </td>
        {% endfor %}        
    </tr>
    {% endfor %}
</table> 

But that isn't giving me selected pieces of data its just all of it

Aucun commentaire:

Enregistrer un commentaire