<sqlite3.Row object at 0x1017fe3f0> instead of database contents
问题 My templates is this: {% for order in orders %} <li><h2>{{ order}}</h2> {% endfor %} and my routing function is this: @app.route('/order_history') def orderhistory(): db = get_db() cur = db.execute('select * from order_items') orders = cur.fetchall() return render_template('order_history.html', orders = orders) Any idea why I am getting row object locations instead of the db contents? 回答1: You need to get the data from the rows: {% for order in orders %} <li><h2>{{ order[0] }}</h2></li> {%