1 Star 0 Fork 0

敏哥/flask-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
5bootstrap.py 706 Bytes
一键复制 编辑 原始数据 按行查看 历史
敏哥 提交于 5个月前 . flask-bootstrap
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)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/PatrickW/flask-web.git
git@gitee.com:PatrickW/flask-web.git
PatrickW
flask-web
flask-web
master

搜索帮助