Record approved direct content API checkpoint

This commit is contained in:
2026-09-27 11:40:16 +03:30
parent b6e0d41691
commit 01edaa0d8a
2 changed files with 3 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ Create one fixed record per page and one shared site record, using explicit text
### 3. Serve current content
Expose only the small public read API needed by the frontend for shared site content and the four fixed pages. Responses contain current text, media URLs/alt text, and SEO fields. Remove revision IDs, status, draft preview, publish, and restore from the schema. Define empty-record behavior and cache handling so a successful admin save appears on the next public request.
Expose only the small public read API needed by the frontend for shared site content and the four fixed pages. The implementation and response shapes are documented in the backend [content API v1 note](../../guilan-ace-backend/docs/content-api-v1.md). Responses contain current text, media URLs/alt text, and SEO fields. Remove revision IDs, status, draft preview, publish, and restore from the schema. Define empty-record behavior and cache handling so a successful admin save appears on the next public request.
**Check:** anonymous reads return current saved values; unknown pages and missing records have explicit responses; an admin save is visible through the API immediately. No draft or preview route exists.

View File

@@ -24,8 +24,8 @@ Checkpoint C was approved by the owner on 2026-09-27 after reviewing [the schema
- [ ] **T08 — Audit current CMS data and permissions (S; deps: T06–T07).** Files: B migration/data audit, D environment record. Acceptance: applied migrations, real content/media rows, and content-specific group/permission assignments are known for each target environment; any data/access migration is mapped. Verify: fresh and current-schema database copies. This replaces the old draft/publish T08.
- [ ] **T09 — Simplify content schema and use native Unfold forms (M; deps: T08).** Files: B content models/migrations/admin/forms/tests. Acceptance: one editable record per fixed page and shared site identity; explicit text/image/alt/SEO fields; direct Save; standard Django model change permissions; no arbitrary page creation, custom admin templates, draft/revision/approval workflow, or delete action. Verify: permission tests, migrations, and superuser/authorized staff admin walkthrough at 390px and desktop against the existing Unfold Blog Category form. This replaces the old T09 and its review criteria.
- [ ] **Checkpoint D (deps: T09).** Owner reviews the real Unfold content forms and direct-save permission behavior before API work.
- [ ] **T10 — Expose current-content read API (M; deps: T09).** Files: B content Ninja router/schemas/tests, `config/api.py`. Acceptance: shared site record and four fixed pages expose current content and SEO, with explicit missing/unknown behavior and no revision/status/preview fields. Verify: anonymous read and save-then-read tests, including cache behavior.
- [ ] **Checkpoint E (deps: T10).** The small current-content API shape is checked before frontend integration. No private preview API is planned.
- [x] **T10 — Expose current-content read API (M; deps: T09).** Files: B content Ninja router/schemas/tests, `config/api.py`; contract: backend [content API v1 note](../../guilan-ace-backend/docs/content-api-v1.md). Acceptance: shared site record and four fixed pages expose current content and SEO, with explicit missing/unknown behavior and no revision/status/preview fields. Verified: anonymous read, save-then-read, missing content, and cache behavior; backend suite passed 255 tests and Django checks passed. Owner approved the API checkpoint on 2026-09-27.
- [x] **Checkpoint E (deps: T10).** The current-content API shape was checked and approved by the owner on 2026-09-27. No private preview API is planned.
- [ ] **T12 — Review starting content and media (M; deps: T01, T09).** Files: D source review, B initial content data. Acceptance: exact legacy values and sources are reviewed; disputed claims/links and unlicensed media are excluded until approved. Verify: owner checks the content that will become public.
- [ ] **T13 — Initialize fixed content records safely (S; deps: T12).** Files: B data migration or small initialization command/tests. Acceptance: approved starting values are inserted once, existing admin edits are preserved, and no draft status exists. Verify: apply twice on a database copy; second run leaves edited records unchanged. Add a dry run only if the T08 audit finds overwrite risk.
- [ ] **Checkpoint F (deps: T12–T13).** Starting public content and images are reviewed before frontend cutover.