代码拉取完成,页面将自动刷新
from flask_bootstrap import Bootstrap
from flask import Flask,render_template,abort
app = Flask(__name__)
bootstrap = Bootstrap(app)
SERVER_PORT=9999
# http://localhost:9999
@app.route('/')
def index():
return render_template("bootstrap.html",name="diyai1314")
@app.errorhandler(404)
def page_not_found(e):
return render_template('404.html'), 404
# http://localhost:9999/server_error
@app.route('/server_error')
def server_error():
abort(500)
return render_template("bootstrap.html",name="diyai1314")
@app.errorhandler(500)
def internal_server_error(e):
return render_template('500.html'), 500
if __name__ == '__main__':
app.run(host='0.0.0.0', port=SERVER_PORT, debug=True)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。