feat(home/models.py): only allow CourseModulePages to be created under CoursePages
This commit is contained in:
@@ -57,6 +57,7 @@ class CoursePage(Page):
|
||||
FieldPanel("body"),
|
||||
FieldPanel("allowed_groups", widget=CheckboxSelectMultiple),
|
||||
]
|
||||
subpage_types = ["home.CourseModulePage"]
|
||||
|
||||
|
||||
class CourseModulePage(Page):
|
||||
@@ -78,6 +79,7 @@ class CourseModulePage(Page):
|
||||
return self.title
|
||||
|
||||
content_panels = Page.content_panels + ["body"]
|
||||
parent_page_types = ["home.CoursePage"]
|
||||
|
||||
|
||||
class EventPageTag(TaggedItemBase):
|
||||
|
||||
Reference in New Issue
Block a user