feat: add direct-save CMS and About archive

This commit is contained in:
2026-09-28 20:29:00 +03:30
parent 94b32310af
commit 0f6220f72c
12 changed files with 957 additions and 41 deletions

View File

@@ -1,3 +1,4 @@
from datetime import datetime
from typing import Literal, Optional, Union
from ninja import Schema
@@ -24,6 +25,8 @@ class SiteContentOut(Schema):
contacts: dict[str, str]
address: str
footer_copy: str
enamad_image: Optional[MediaOut] = None
enamad_url: str
seo: SeoOut
@@ -40,16 +43,26 @@ class HomePageOut(PageBaseOut):
hero_body: str
hero_image: Optional[MediaOut] = None
hero_action_label: str
hero_action_url: str
hero_secondary_action_label: str
hero_secondary_action_url: str
featured_events_heading: str
featured_events_intro: str
featured_events_link_label: str
featured_events_url: str
featured_event_action_label: str
featured_posts_heading: str
featured_posts_intro: str
featured_posts_link_label: str
featured_posts_url: str
featured_post_action_label: str
participation_heading: str
participation_body: str
participation_image: Optional[MediaOut] = None
participation_action_label: str
participation_action_url: str
participation_secondary_action_label: str
participation_secondary_action_url: str
class AboutItemOut(Schema):
@@ -59,23 +72,82 @@ class AboutItemOut(Schema):
position: int
class AboutMemberOut(Schema):
name: str
role: str
entry_year: str
bio: str
photo: Optional[MediaOut] = None
position: int
class AboutGalleryImageOut(Schema):
image: MediaOut
caption: str
position: int
class AboutAudienceOut(Schema):
title: str
text: str
icon: str
position: int
class AboutMilestoneOut(Schema):
year_label: str
title: str
description: str
position: int
class AboutSelectedEventOut(Schema):
id: int
title: str
slug: str
start_time: datetime
featured_image: Optional[MediaOut] = None
class AboutYearOut(Schema):
year_label: str
position: int
members: list[AboutMemberOut]
selected_events: list[AboutSelectedEventOut]
class AboutPageOut(PageBaseOut):
slug: Literal["about"]
identity_heading: str
identity_body: str
mission_heading: str
mission_body: str
vision_heading: str
vision_body: str
activities_heading: str
activities_body: str
values_heading: str
values_body: str
committees_heading: str
committees_body: str
affiliations_heading: str
affiliations_body: str
faq_heading: str
contact_heading: str
members_heading: str
members_intro: str
gallery_heading: str
gallery_intro: str
past_events_heading: str
history_heading: str
audience_heading: str
year_events_heading: str
cta_heading: str
cta_body: str
cta_action_label: str
cta_action_url: str
items: list[AboutItemOut]
members: list[AboutMemberOut]
gallery_images: list[AboutGalleryImageOut]
audiences: list[AboutAudienceOut]
milestones: list[AboutMilestoneOut]
years: list[AboutYearOut]
class ListingPageOut(PageBaseOut):