@register.filter
def is_sibling_of(page1, page2):
    """
    Determines whether a given page is a sibling of another page

    ::

        {% if page|is_sibling_of:feincms_page %} ... {% endif %}
    """

    try:
        return page1.parent_id == page2.parent_id
    except __HOLE__:
        return False

# ------------------------------------------------------------------------
dataset/ETHPy150Open django-leonardo/django-leonardo/leonardo/module/nav/templatetags/webcms_nav_tags.py/is_sibling_of