T-001: 初始化 Wagtail 项目骨架

This commit is contained in:
ila
2026-07-06 17:30:34 +08:00
parent abfe00103c
commit feb662da67
42 changed files with 997 additions and 76 deletions
+23
View File
@@ -101,3 +101,26 @@
- 决策:开发统一使用 `python3.12` 命令(系统已安装 3.12.12),不依赖 `python3` 别名(指向 3.8.10)。
- 下一步:T-001 初始化 Wagtail 项目骨架。
## 2026-07-06 T-001 初始化 Wagtail 项目骨架
- 状态:DONE
- 变更:
- 创建 Python 3.12 venv(`--system-site-packages`,Pillow 由 MSYS2 `mingw-w64-x86_64-python-pillow` 提供)
- 安装 Wagtail 7.4.2 + Django 6.0.6 + 全部依赖(通过 MSYS2 bash 环境)
- `wagtail start skelet .` 生成项目骨架(`manage.py`、`skelet/`、`home/`、`search/`)
- `manage.py startapp core` 并加入 `INSTALLED_APPS`
- 删除 `Dockerfile`;`requirements.txt` 替换为 `pip freeze` 精确版本
- `manage.py migrate` 成功;`createsuperuser`(admin/admin123)
- `init.sh` / `init.ps1` 替换为真实命令(`pip install`、`manage.py check`、`manage.py runserver`)
- 回写 `03-tech-stack.md`(版本钉死状态、测试方案、§三命令)、`04-architecture.md` §六(结构决策、已初始化标记)、`current-state.md`(快照、目录表、任务看板状态、可运行命令)、`06-tasks.md`(T-001→DONE)
- 验证:
- `manage.py check`:0 errors, 3 treebeard 兼容警告(非阻塞)
- `curl http://127.0.0.1:8000/`:HTTP 200
- `curl http://127.0.0.1:8000/admin/login/`:HTTP 200
- 阻塞:无。
- 决策:
- Python 3.12 来自 MSYS2/MinGW(`C:\msys64\mingw64\bin\python3.12.exe`),创建 Unix 风格 venv(`bin/` 非 `Scripts/`)
- 因 MinGW 工具链版本冲突(GCC 8.1 vs Python 3.12),采用 `--system-site-packages` 复用 MSYS2 预编译 Pillow 12.0,非纯 Python 依赖(pillow-heif)在 MSYS2 bash 中编译
- 开发命令需在 MSYS2 bash shell 中运行;`init.ps1` 在 PowerShell 中直接调用 `.venv/bin/` 路径可工作
- 下一步:T-002 建立基础配置与环境样例。