refactor: P7 切尾——删除 application/extensions/utils,WSGI 切 src

【切尾】
- src/app.py:应用工厂(原 application/factory.py)
- src/extensions.py:扩展注册编排(原 extensions/)
- src/wsgi.py:生产 WSGI 入口
- 根 app.py 改为 from src.app import create_app(开发入口保留)
- gunicorn/Docker/compose 指向 src.wsgi:app
- 删除 application/、extensions/、utils/(全部代码已迁入 src/)

【清理】21 个 router 中间件导入改 src.core;修复 level 服务潜在 bug
(utils.load2dict 不存在 → model_to_dict);测试文件 R 导入改 src.core

【里程碑】全项目 flake8 从 P1 基线 154 条 → **0 条**;
12 passed;app.py 与 src.wsgi 双入口均启动

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
DjangoAdmin Dev
2026-08-07 19:45:28 +08:00
co-authored by Claude
parent 4d74b31431
commit 5504f3f2c6
176 changed files with 272 additions and 1674 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ services:
# ------------------------------------------------------------------------
# 执行命令(覆盖 Dockerfile 中的 CMD)
# 生产环境启动:使用 Gunicorn + Gevent
command: gunicorn -c gunicorn.conf.py app:app
command: gunicorn -c gunicorn.conf.py src.wsgi:app
# ------------------------------------------------------------------------
# 日志配置(集中式日志管理)