title: Data table python flask
body: <p>I have a question regarding mysql db python table in Bootstrap.</p>
  
  <p>My question is my data is not shown in the table. I can see it gets data because of when I add row in mysql db with data the table increases. </p>
  
  <p>app.py code:</p>
  
  <pre><code>@app.route('/dashboard')
  @is_logged_in
  def dashboard():
         #create cursor
      cur = mysql.get_db().cursor()
      #Get data
      result = cur.execute("SELECT * FROM test")
      data=cur.fetchall()
      if result &gt; 0:
          return render_template('dashboard.html', data=data)
      else:
          msg = 'No DOC Found'
          return render_template('dashboard.html', msg=msg)
      #close connection
      cur.close()
      return render_template('dashboard.html' )
  </code></pre>
  
  <p>.html </p>
  
  <pre><code>  &lt;table class="table table-striped"&gt;
                &lt;tr&gt;
                     &lt;th&gt;data1&lt;/th&gt;
                     &lt;th&gt;data2&lt;/th&gt;
                &lt;/tr&gt;
                {% for test in data%}
                &lt;tr&gt;
                     &lt;td&gt;{{test.rdno}}&lt;/td&gt;
                     &lt;td&gt;{{test.ipno}}&lt;/td&gt;
  
                  {% endfor %}
                &lt;/tr&gt;
            &lt;/table&gt;
  </code></pre>