@register.filter
def for_object(permissions, obj):
    # some permission check has failed earlier, so we don't bother trying to
    # bind a new object to it.
    if permissions == '':
        return permissions
    return permissions.bind_object(obj)
Only useful in the permission handling. This filter binds a new object to
dataset/ETHPy150Open pydanny/django-admin2/djadmin2/templatetags/admin2_tags.py/for_object