kopia lustrzana https://github.com/wagtail/wagtail
Deprecate Page.get_other_siblings
rodzic
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)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue