<!DOCTYPE HTML>
<html>

<body>
    <form action="./purchases">
        <input type="text" placeholder="Location" name="location" />
        <input type="submit" />
        <br>
        <input type="reset" value="Reset" onclick="parent.location='./purchases'" />
    </form>
    <table border=1>
        <tr>
            <th>ID</th>
            <td>UPC</td>
            <td>Quantity</td>
            <td>Date</td>
            <td>Location</td>
        </tr>
        {% for id, upc, quantity, date, location in data %}
        <tr>
            <th> {{ id }}</th>
            <th> {{ upc }} </th>
            <td> {{ quantity }} </td>
            <td> {{ date }}</td>
            <td> {{ location }} </td>
        </tr>
        {% endfor %}
    </table>
</body>

</html>