上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 192 下一页
摘要: 一,代码: common/header.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>User List</title> </head> <body> <div style="width:100% 阅读全文
posted @ 2025-11-08 10:54 刘宏缔的架构森林 阅读(17) 评论(0) 推荐(0)
摘要: 一,代码 结构: py from flask import Blueprint,jsonify,render_template user = Blueprint('user', __name__) @user.route("/list/") def tech_news(): meta = { "ti 阅读全文
posted @ 2025-11-08 10:54 刘宏缔的架构森林 阅读(23) 评论(0) 推荐(0)
摘要: 一,代码 controller/admin.py from flask import Blueprint,jsonify admin = Blueprint('admin', __name__) # 用蓝图注册路由 @admin.route("/add/") def society_news(): 阅读全文
posted @ 2025-11-08 10:54 刘宏缔的架构森林 阅读(9) 评论(0) 推荐(0)
摘要: 一,默认的错误路径: 二,代码: from flask import Flask,jsonify app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.errorhandler(404 阅读全文
posted @ 2025-11-08 10:54 刘宏缔的架构森林 阅读(11) 评论(0) 推荐(0)
摘要: 一,生成requirements.txt $ pip3 freeze > requirements.txt 查看效果 : $ more requirements.txt blinker==1.9.0 click==8.3.0 Flask==3.1.2 itsdangerous==2.2.0 Jinj 阅读全文
posted @ 2025-11-08 10:54 刘宏缔的架构森林 阅读(11) 评论(0) 推荐(0)
摘要: 一,安装jsonify $ pip3 install jsonify 二,返回json from flask import Flask,jsonify app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, Wo 阅读全文
posted @ 2025-11-08 10:52 刘宏缔的架构森林 阅读(28) 评论(0) 推荐(0)
摘要: 一,用pip3安装框架 $ pip3 install flask Collecting flask Downloading flask-3.1.2-py3-none-any.whl.metadata (3.2 kB) Collecting blinker>=1.9.0 (from flask) Do 阅读全文
posted @ 2025-11-08 10:52 刘宏缔的架构森林 阅读(55) 评论(0) 推荐(0)
摘要: 一,安装node 安装Node.js(推荐) 下载地址:https://nodejs.org 验证安装:node -v $ node -v v22.20.0 二,安装python库 $ pip install PyExecJS Collecting PyExecJS Downloading PyEx 阅读全文
posted @ 2025-11-08 10:52 刘宏缔的架构森林 阅读(33) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2025-11-02 14:43 刘宏缔的架构森林 阅读(15) 评论(0) 推荐(0)
摘要: 解决: 阅读全文
posted @ 2025-11-02 14:42 刘宏缔的架构森林 阅读(13) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 192 下一页