Deprecate Page.get_other_siblings

pull/372/head
Karl Hobley 2014-06-26 14:41:09 +01:00
rodzic a15939add6
commit deb2e0f9d8
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

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

Wyświetl plik

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