Skip to content

Commit

Permalink
Updated certain page max_count, subpage and parent_page_types
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs committed Oct 16, 2024
1 parent 78afd59 commit 3d601df
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions etna/articles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def article_pages(self):
FieldPanel("featured_pages"),
]

max_count = 1
parent_page_types = ["collections.ExplorerIndexPage"]
subpage_types = [
"articles.ArticlePage",
Expand Down
7 changes: 7 additions & 0 deletions etna/blog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ class BlogPage(HeroImageMixin, BasePageWithRequiredIntro):
blogs within this blog.
"""

parent_page_types = [
"blog.BlogIndexPage",
"blog.BlogPage",
"collections.ExplorerIndexPage",
"generic_pages.GeneralPage",
"generic_pages.HubPage",
]
subpage_types = ["blog.BlogPostPage", "blog.BlogPage"]

content_panels = (
Expand Down
2 changes: 2 additions & 0 deletions etna/collections/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@ class ExplorerIndexPage(BasePageWithRequiredIntro):
),
]

max_count = 1
parent_page_types = ["home.HomePage"]
subpage_types = [
"collections.TopicExplorerIndexPage",
"collections.TimePeriodExplorerIndexPage",
"articles.ArticleIndexPage",
"blog.BlogPage",
]

# DataLayerMixin overrides
Expand Down
1 change: 1 addition & 0 deletions etna/people/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class PeopleIndexPage(BasePage):
people pages from the list.
"""

max_count = 1
subpage_types = ["people.PersonPage"]

parent_page_types = ["home.HomePage"]
Expand Down

0 comments on commit 3d601df

Please sign in to comment.