mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
remove allowed_parent_pages / allowed_subpages.
allowed_parent_pages was a (broken) relic of the aborted no-tree add-page interface where you selected page type first and then specify where to put it. In that context, allowed_subpages doesn't make sense because the page you're about to add doesn't have subpages...
This commit is contained in:
parent
f28f7f92c2
commit
4398b64282
@ -573,20 +573,6 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
|
||||
return [ct for ct in cls.clean_subpage_types()
|
||||
if cls_ct in ct.model_class().clean_parent_page_types()]
|
||||
|
||||
@classmethod
|
||||
def allowed_parent_pages(cls):
|
||||
"""
|
||||
Returns the list of pages that this page type can be a subpage of
|
||||
"""
|
||||
return Page.objects.filter(content_type__in=cls.allowed_parent_page_types())
|
||||
|
||||
@classmethod
|
||||
def allowed_subpages(cls):
|
||||
"""
|
||||
Returns the list of pages that this page type can be a parent page of
|
||||
"""
|
||||
return Page.objects.filter(content_type__in=cls.allowed_subpage_types())
|
||||
|
||||
@classmethod
|
||||
def get_verbose_name(cls):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user