

@register.filter
def for_object(permissions, obj):
    '\n    Only useful in the permission handling. This filter binds a new object to\n    the permission handler to check for object-level permissions.\n    '
    if (permissions == ''):
        return permissions
    return permissions.bind_object(obj)

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