@register.filter
def get_relationship(from_user, to_user):
    """Get relationship between two users."""
    try:
        return Relationship.objects.get_relationship(from_user, to_user)
    except __HOLE__:
        return None

# get_relationship templatetag.
dataset/ETHPy150Open nathanborror/django-basic-apps/basic/relationships/templatetags/relationships.py/get_relationship