Some checks failed
- Add ProductCard/ProductsSection schema and _products.html section macro
- Rewrite seed script with 3-platform homepage sections (wizard, OMS, loyalty),
platform marketing pages, and store defaults with {{store_name}} placeholders
- Add resolve_placeholders() to ContentPageService for store default pages
- Fix SQLAlchemy filter bugs: replace Python `is None` with `.is_(None)` across
all ContentPageService query methods (was silently breaking all platform page lookups)
- Remove hardcoded orion fallback and delete homepage-orion.html
- Add placeholder hint box with click-to-copy in admin content page editor
- Export ProductCard/ProductsSection from cms schemas __init__
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
131 lines
3.0 KiB
Python
131 lines
3.0 KiB
Python
# app/modules/cms/schemas/__init__.py
|
|
"""
|
|
CMS module Pydantic schemas for API request/response validation.
|
|
"""
|
|
|
|
from app.modules.cms.schemas.content_page import (
|
|
CMSUsageResponse,
|
|
# Admin schemas
|
|
ContentPageCreate,
|
|
ContentPageListItem,
|
|
ContentPageResponse,
|
|
ContentPageUpdate,
|
|
# Public/Shop schemas
|
|
PublicContentPageResponse,
|
|
SectionUpdateResponse,
|
|
# Store schemas
|
|
StoreContentPageCreate,
|
|
StoreContentPageUpdate,
|
|
)
|
|
from app.modules.cms.schemas.content_page import (
|
|
HomepageSectionsResponse as ContentPageHomepageSectionsResponse,
|
|
)
|
|
from app.modules.cms.schemas.homepage_sections import (
|
|
CTASection,
|
|
FeatureCard,
|
|
FeaturesSection,
|
|
# Section components
|
|
HeroButton,
|
|
HeroSection,
|
|
# Main structure
|
|
HomepageSections,
|
|
HomepageSectionsResponse,
|
|
PricingSection,
|
|
ProductCard,
|
|
ProductsSection,
|
|
# API schemas
|
|
SectionUpdateRequest,
|
|
# Translatable text
|
|
TranslatableText,
|
|
)
|
|
|
|
# Image schemas
|
|
from app.modules.cms.schemas.image import (
|
|
ImageStorageStats,
|
|
)
|
|
|
|
# Media schemas
|
|
from app.modules.cms.schemas.media import (
|
|
FailedFileInfo,
|
|
MediaDetailResponse,
|
|
MediaItemResponse,
|
|
MediaListResponse,
|
|
MediaMetadataUpdate,
|
|
MediaUploadResponse,
|
|
MediaUsageItem,
|
|
MediaUsageResponse,
|
|
MessageResponse,
|
|
MultipleUploadResponse,
|
|
OptimizationResultResponse,
|
|
UploadedFileInfo,
|
|
)
|
|
|
|
# Theme schemas
|
|
from app.modules.cms.schemas.store_theme import (
|
|
StoreThemeBranding,
|
|
StoreThemeColors,
|
|
StoreThemeFonts,
|
|
StoreThemeLayout,
|
|
StoreThemeResponse,
|
|
StoreThemeUpdate,
|
|
ThemeDeleteResponse,
|
|
ThemePresetListResponse,
|
|
ThemePresetPreview,
|
|
ThemePresetResponse,
|
|
)
|
|
|
|
__all__ = [
|
|
# Content Page - Admin
|
|
"ContentPageCreate",
|
|
"ContentPageUpdate",
|
|
"ContentPageResponse",
|
|
"ContentPageHomepageSectionsResponse",
|
|
"SectionUpdateResponse",
|
|
# Content Page - Store
|
|
"StoreContentPageCreate",
|
|
"StoreContentPageUpdate",
|
|
"CMSUsageResponse",
|
|
# Content Page - Public
|
|
"PublicContentPageResponse",
|
|
"ContentPageListItem",
|
|
# Homepage Sections
|
|
"TranslatableText",
|
|
"HeroButton",
|
|
"HeroSection",
|
|
"FeatureCard",
|
|
"FeaturesSection",
|
|
"ProductCard",
|
|
"ProductsSection",
|
|
"PricingSection",
|
|
"CTASection",
|
|
"HomepageSections",
|
|
"SectionUpdateRequest",
|
|
"HomepageSectionsResponse",
|
|
# Media
|
|
"FailedFileInfo",
|
|
"MediaDetailResponse",
|
|
"MediaItemResponse",
|
|
"MediaListResponse",
|
|
"MediaMetadataUpdate",
|
|
"MediaUploadResponse",
|
|
"MediaUsageResponse",
|
|
"MessageResponse",
|
|
"MultipleUploadResponse",
|
|
"OptimizationResultResponse",
|
|
"MediaUsageItem",
|
|
"UploadedFileInfo",
|
|
# Image
|
|
"ImageStorageStats",
|
|
# Theme
|
|
"ThemeDeleteResponse",
|
|
"ThemePresetListResponse",
|
|
"ThemePresetPreview",
|
|
"ThemePresetResponse",
|
|
"StoreThemeBranding",
|
|
"StoreThemeColors",
|
|
"StoreThemeFonts",
|
|
"StoreThemeLayout",
|
|
"StoreThemeResponse",
|
|
"StoreThemeUpdate",
|
|
]
|