Merged in beta-snippets (pull request #5)

Constrain page parent types
This commit is contained in:
Oleg Lavrovsky 2017-04-11 22:10:29 +00:00
commit 273c4352c0
2 changed files with 3 additions and 2 deletions

View file

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

View file

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