

@register.filter
def for_view(permissions, view):
    '\n    Only useful in the permission handling. This filter binds a new view to\n    the permission handler to check for view names that are not known during\n    template compile time.\n    '
    if (permissions == ''):
        return permissions
    return permissions.bind_view(view)

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