Files
iamzhaohaibo f7f06d9848 add Web/DoubanMovieWeb/app.py.
Signed-off-by: iamzhaohaibo <941604465@qq.com>
2025-12-18 10:30:30 +00:00

18 lines
349 B
Python

from flask import Flask, render_template
from DB import DB
db = DB()
conn = db.connect()
douban_table = db.table()
app = Flask(__name__)
@app.route('/', methods=['GET'])
def index():
result = conn.execute(douban_table.select())
return render_template('index.html', rows=result)
if __name__ == '__main__':
app.run()