我把您的code简化了一下,其实也就是把目前code里面没有使用的包去掉了。执行没问
题啊,不管是/还是/service都显示了templates里面的index.html的内容啊。
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def home():
return render_template('index.html')
@app.route("/service")
def service():
return render_template('index.html')
if __name__=="__main__":
app.run()
【 在 shmilhong 的大作中提到: 】
: 大佬你好!
: 我有个外网的固定ip,想自己用flask弄个网站。
: 其中http服务用(IIS+wfastcgi)实现。
: ...................
--
FROM 216.49.7.*