Add page-tree decision and Wagtail M2M implementation note

- 04-architecture 3.1: add ProjectIndexPage; authoritative page tree
  (project pages live under /projects/, never under scenario pages);
  ScenarioPage renders projects via query; filtering lives in
  ProjectIndexPage.get_context(), no separate Django view; Page M2M
  fields must use modelcluster ParentalManyToManyField
- 06-tasks: sync T-102 row/detail and T-204 quick-table accordingly
- routes: point project list page back to the 3.1 tree
- progress.md: append maintenance record

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
ila
2026-07-06 16:23:44 +08:00
co-authored by Claude Fable 5
parent 678d081124
commit 14eae57643
4 changed files with 37 additions and 2 deletions
+12
View File
@@ -80,3 +80,15 @@
- 决策:筛选参数契约以 `04-architecture.md` §3.4 为唯一权威;`home`/`search` app 保留不改名;`AiCodingScore` 不建模型;种子内容评分必须人工确认。
- 下一步:T-001 初始化 Wagtail 项目骨架(详单已可直接照做)。
## 2026-07-06 补齐页面树决策与 Wagtail 多对多实现注意
- 状态:DONE
- 变更:
- `docs/04-architecture.md` §3.1:新增 `ProjectIndexPage`(`/projects/` 承载页);新增页面树结构图(唯一权威):项目详情统一挂 `ProjectIndexPage` 下、不挂场景页下(多对多场景 vs 单父节点树的冲突由此消解);`ScenarioPage` 用查询渲染项目、无子页面;筛选实现在 `ProjectIndexPage.get_context()`、不另建 Django view;新增 Wagtail 实现注意:Page 上的多对多必须用 modelcluster `ParentalManyToManyField`。
- `docs/06-tasks.md`:T-102 表行与详单同步上述两点(`ParentalManyToManyField`、同轮建 `ProjectIndexPage`);T-204 速查行标明筛选落点。
- `docs/routes.md`:项目列表页标注承载 Page 并指回 §3.1。
- 验证:`grep` 确认 `ProjectIndexPage` 在 04/06/routes 三处一致;`ParentalManyToManyField` 在 04 与 06 两处一致。
- 阻塞:无。
- 决策:页面树以 §3.1 结构图为唯一权威;`/languages/`、`/frameworks/` 聚合页 MVP 不建 Page,由筛选参数替代。
- 下一步:T-001 初始化 Wagtail 项目骨架。