@register.inclusion_tag('authority/permission_request_delete_link.html', takes_context=True)
def permission_request_delete_link(context, perm):
 user = context['request'].user
 if user.is_authenticated():
  link_kwargs = base_link(context, perm, 'authority-delete-permission-request')
  if user.has_perm('authority.delete_permission'):
   link_kwargs['is_requestor'] = False
   return link_kwargs
  if ((not perm.approved) and (perm.user == user)):
   link_kwargs['is_requestor'] = True
   return link_kwargs
 return {'url': None}

@ register . inclusion_tag ( 'authority/permission_request_delete_link.html' , takes_context = True ) def permission_request_delete_link ( context , perm ) : user = context [ 'request' ] . user if user . is_authenticated ( ) : link_kwargs = base_link ( context , perm , 'authority-delete-permission-request' ) if user . has_perm ( 'authority.delete_permission' ) : link_kwargs [ 'is_requestor' ] = False return link_kwargs if ( ( not perm . approved ) and ( perm . user == user ) ) : link_kwargs [ 'is_requestor' ] = True return link_kwargs return { 'url' : None }
renders a html link to the delete view of the given permission request .