

@register.filter
def for_admin(permissions, admin):
    '\n    Only useful in the permission handling. This filter binds a new admin to\n    the permission handler to allow checking views of an arbitrary admin.\n    '
    if (permissions == ''):
        return permissions
    return permissions.bind_admin(admin)

dataset/ETHPy150Open pydanny/django-admin2/djadmin2/templatetags/admin2_tags.py for_admin/original