@register.filter
def is_sibling_of(page1, page2):
 try:
  return _is_sibling_of(page1, page2)
 except AttributeError:
  return False

@ register . filter def is_sibling_of ( page1 , page2 ) : try : return _is_sibling_of ( page1 , page2 ) except AttributeError : return False
determines whether a given page is a sibling of another page {% if page|is_sibling_of:feincms_page %} .