我想在表上的flask应用程序上显示来自csv文件的信息,但它仅显示csv文件的第一行。
@app.route('/view/', methods=['GET', 'POST'])
def view():
with open('/home/MakerofMarkers/mysite/container.csv', 'r') as csv_file:
csv_reader = csv.reader(csv_file)
next(csv_reader)
for line in csv_reader:
return str(line)
return render_template('work.html')
您可能需要“构建” work.html,又名html + css + javascript / jquery,并将烧瓶路径连接到其中。为此,大量阅读材料。