fix: consolidate CMS page seed scripts and fix 3 bugs

- Fix `ContentPage.store_id is None` (Python identity check, always
  False) → use `.is_(None)` for proper SQLAlchemy NULL filtering
- Create pages for ALL platforms instead of only OMS
- Merge create_platform_pages.py into create_default_content_pages.py
  (5 overlapping pages, only platform_homepage was unique)
- Delete redundant create_platform_pages.py
- Update Makefile, install.py, and docs references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-14 21:18:47 +01:00
parent 62e418c473
commit 3c2b559282
8 changed files with 139 additions and 624 deletions

View File

@@ -67,8 +67,8 @@ app/
│ └── content_page_service.py # CMS business logic
└── main.py # Platform routes (lines 284-404)
scripts/
└── create_platform_pages.py # Seeder script
scripts/seed/
└── create_default_content_pages.py # Seeder script (all platforms)
docs/features/
└── platform-homepage.md # This file
@@ -193,14 +193,17 @@ Manage all platform content pages from a single interface:
```bash
# Create all default platform pages
python scripts/seed/create_platform_pages.py
python scripts/seed/create_default_content_pages.py
```
This creates:
This creates (for all platforms):
- Platform Homepage (with modern template)
- About Us
- FAQ
- Contact Us
- FAQ
- Shipping Policy
- Return & Refund Policy
- Privacy Policy
- Terms of Service
- Privacy Policy
@@ -568,7 +571,7 @@ return templates.TemplateResponse(
**Solutions:**
1. Run seeder script:
```bash
python scripts/seed/create_platform_pages.py
python scripts/seed/create_default_content_pages.py
```
2. Verify page exists: