0
0
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:
Karl Hobley 2014-06-26 14:41:09 +01:00
parent a15939add6
commit deb2e0f9d8
2 changed files with 4 additions and 1 deletions

View File

@ -203,7 +203,6 @@ Methods:
* get_context
* get_template
* is_navigable
* get_other_siblings
* get_ancestors
* get_descendants
* get_siblings

View File

@ -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)