@register.filter
def friends(user):
    try:
        return Relationship.objects.get_friends_for_user(user)
    except AttributeError:
        return []
Reimplemented for IPython-style prompts.
dataset/ETHPy150Open nathanborror/django-basic-apps/basic/relationships/templatetags/relationships.py/friends--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/frontend/qt/console/ipython_widget.py/IPythonWidget._show_interpreter_prompt_for_reply