@register.tag
def ifhasperm(parser, token):
 return PermissionComparisonNode.handle_token(parser, token)

@ register . tag def ifhasperm ( parser , token ) : return PermissionComparisonNode . handle_token ( parser , token )
this function provides functionality for the ifhasperm template tag syntax:: {% ifhasperm permission_label .