title: Cannot get HTML to display SQLite3 data with python & flask
body: <p>I'm having an issue getting an HTML page to display my SQLite3 data using Python &amp; Flask. I found a question on here and used the same code, plus different variations to no success. There are no error messages and the HTML page loads, however there is no data present. This is the code I am using to get the data;</p>
  
  <pre><code>@app.route("/viewpackages", methods=['GET'])
  def viewpackages():
      con = sqlite3.connect('utpg.db')
      db = con.cursor()
      user_id = session.get('id')
      getpackages = db.execute("SELECT pck_id, client_id, date, price,  privatelesson,"
                               "shortgamelesson, playinglesson, notes FROM packages WHERE client_id = ?;", (user_id, ))
  
      return render_template("view_packages.html", items=getpackages.fetchall())
  </code></pre>
  
  <p>this is the code I attempting to use to display the data;</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;table&gt;
  {% for item in items %}
  &lt;tr&gt;
      &lt;td&gt;{{column1}}&lt;/td&gt;
      &lt;td&gt;{{column2}}&lt;/td&gt;
      &lt;td&gt;{{column3}}&lt;/td&gt;
      &lt;td&gt;{{column4}}&lt;/td&gt;
      &lt;td&gt;{{column5}}&lt;/td&gt;
      &lt;td&gt;{{column6}}&lt;/td&gt;
      &lt;td&gt;{{column7}}&lt;/td&gt;
      &lt;td&gt;{{column8}}&lt;/td&gt;
  &lt;/tr&gt;
  {% endfor %}
  &lt;/table&gt;
  </code></pre>
  
  <p>I tried changing 'column' to the actual db column name, with the same issue. I tried calling SELECT * instead of each individual column, same issue. If I run this code in python;</p>
  
  <pre><code>con = sqlite3.connect('utpg.db')
  db = con.cursor()
  user_id = session.get('id')
  getpackages = db.execute("SELECT pck_id, client_id, date, price,    privatelesson, shortgamelesson, playinglesson, notes FROM   packages WHERE        client_id = ?;", (user_id, ))
  packages = getpackages.fetchall()
  for row in packages:
       print(row)
  </code></pre>
  
  <p>It returns the desired results. So I am thinking there is an issue with the HTML somewhere but I cannot figure it out.</p>