【发布时间】:2020-04-14 19:25:31
【问题描述】:
我是新使用烧瓶和 我想提取该数据并使用 FLASK 以 html 形式将其显示为选择选项。 这是我的选择
<span class="input-group-addon">Unity</span>
<select name="unity" class="selectpicker form-control">
</select>
我想用这些数据填充它
@app.route("/stadistics/unity")
def unity():
db = get_db()
cursor = db.cursor()
cursor.execute("select unity from mse.unity")
unity = cursor.fetchall()
print (unity)
我该怎么做?
【问题讨论】:
标签: python html postgresql flask psycopg2