diff --git a/Web/DoubanMovieWeb/app.py b/Web/DoubanMovieWeb/app.py new file mode 100644 index 0000000..747825e --- /dev/null +++ b/Web/DoubanMovieWeb/app.py @@ -0,0 +1,18 @@ +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() \ No newline at end of file