feat: add vendor dropdown and show_in_legal to content page editor

- Load vendors dynamically in content page editor dropdown
- Add show_in_legal field to default content pages seed script
- Set privacy and terms pages to show_in_legal=true, show_in_footer=false
- Update page creation in seed script to use show_in_legal

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-28 20:45:31 +01:00
parent 42442cec8f
commit 3f2b6bf1b8
3 changed files with 34 additions and 5 deletions

View File

@@ -362,8 +362,9 @@ DEFAULT_PAGES = [
""",
"meta_description": "Learn how we collect, use, and protect your personal information",
"meta_keywords": "privacy, data protection, security, policy",
"show_in_footer": True,
"show_in_footer": False,
"show_in_header": False,
"show_in_legal": True,
"display_order": 6,
},
{
@@ -446,8 +447,9 @@ DEFAULT_PAGES = [
""",
"meta_description": "Read our terms of service governing the use of our platform",
"meta_keywords": "terms, conditions, legal, agreement",
"show_in_footer": True,
"show_in_footer": False,
"show_in_header": False,
"show_in_legal": True,
"display_order": 7,
},
]
@@ -497,8 +499,9 @@ def create_default_pages(db: Session) -> None:
meta_keywords=page_data["meta_keywords"],
is_published=True,
published_at=datetime.now(UTC),
show_in_footer=page_data["show_in_footer"],
show_in_footer=page_data.get("show_in_footer", True),
show_in_header=page_data.get("show_in_header", False),
show_in_legal=page_data.get("show_in_legal", False),
display_order=page_data["display_order"],
created_at=datetime.now(UTC),
updated_at=datetime.now(UTC),