親愛的,
我是 Flask 和 HTML 的新手。我創建了一個由 SQL Server 資料庫(資料和設定)控制的 python 應用程式
我需要一個管理界面,所以我使用了下面的模板并重新設計了頁面。 https://github.com/app-generator/flask-argon-dashboard
我只需要從此 Flask 應用程式中查詢資料庫并將資料放入此模板中的表中。我搜索了很多,沒有希望。
uj5u.com熱心網友回復:
使用pyodbc查詢資料解決,編輯/app/home/routes.py如下:
定義我的函式
然后:return render_template("home/" template, segment=segment, data=myfunction())
并在 HTML 檔案中,但將 {% for roww in data %} 和 {% endfor %} 放入
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/425146.html
標籤:烧瓶 烧瓶-sqlalchemy
