mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-28 08:48:04 +01:00
Deprecate Page.get_other_siblings
This commit is contained in:
parent
a15939add6
commit
deb2e0f9d8
@ -203,7 +203,6 @@ Methods:
|
||||
* get_context
|
||||
* get_template
|
||||
* is_navigable
|
||||
* get_other_siblings
|
||||
* get_ancestors
|
||||
* get_descendants
|
||||
* get_siblings
|
||||
|
@ -409,6 +409,10 @@ class Page(MP_Node, ClusterableModel, Indexed):
|
||||
return (not self.is_leaf()) or self.depth == 2
|
||||
|
||||
def get_other_siblings(self):
|
||||
warnings.warn(
|
||||
"The 'Page.get_other_siblings()' method has been replaced. "
|
||||
"Use 'Page.get_siblings(inclusive=False)' instead.", DeprecationWarning)
|
||||
|
||||
# get sibling pages excluding self
|
||||
return self.get_siblings().exclude(id=self.id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user