Я хочу отобразить значения из моей базы данных в таблице в html.
cursor = mysql.connection.cursor(MySQLdb.cursors.DictCursor)
cursor.execute("SELECT CardNo, CardName, CardExpDate, CardSecretCode FROM carddetails WHERE UID=%s", (session['id'],))
rows = cursor.fetchall()# data from database
return render_template("paymentdetails.html", positive=positive, negative=negative, rows=rows)
<table id="UserCards">
<tr>
<th width=20%><strong>Card Holder</strong></th>
<th width=20%><strong>Card Number</strong></th>
<th width=10%><strong>Expiry Date</strong></th>
<th width=10%><strong>CVC</strong></th>
</tr>
{% for row in rows %}
<tr id="1">
<td id="name">{{ row }}</td>
<td id="number">{{ row }}</td>
<td id="date">{{ row }}</td>
<div class="bin"><a><span class="bincursor"><i class='fas fa-trash-alt'></i></span></a></div>
<td id="code">{{ row }}</td>
</tr>
{% endfor %}
</table>