Constrain page parent types

This commit is contained in:
Oleg Lavrovsky 2017-04-12 00:10:00 +02:00
parent 0bd8c38f66
commit c5bd710d37
2 changed files with 3 additions and 2 deletions

View file

@ -55,5 +55,6 @@ class ContactForm(AbstractEmailForm):
], "Email"),
]
parent_page_types = ['home.ArticleIndexPage']
class Meta:
verbose_name = "Formular"

View file

@ -43,7 +43,7 @@ class ArticleIndexPage(Page):
context['articles'] = articles
return context
subpage_types = ['home.ArticlePage', 'home.ArticleIndexPage']
subpage_types = ['home.ArticlePage', 'home.ArticleIndexPage', 'home.ContactForm']
class Meta:
verbose_name = "Rubrik"
@ -118,7 +118,7 @@ class ArticlePage(Page):
], heading="Veröffentlichung"),
MultiFieldPanel(Page.promote_panels, "Einstellungen"),
]
parent_page_types = ['home.ArticleIndexPage']
subpage_types = []
class Meta:
verbose_name = "Artikel"