def one_click_unsubscribe_link(user_profile, endpoint):
 token = unsubscribe_token(user_profile)
 resource_path = ('accounts/unsubscribe/%s/%s' % (endpoint, token))
 return ('%s/%s' % (user_profile.realm.uri.rstrip('/'), resource_path))

def one_click_unsubscribe_link ( user_profile , endpoint ) : token = unsubscribe_token ( user_profile ) resource_path = ( 'accounts/unsubscribe/%s/%s' % ( endpoint , token ) ) return ( '%s/%s' % ( user_profile . realm . uri . rstrip ( '/' ) , resource_path ) )
generate a unique link that a logged-out user can visit to unsubscribe from zulip e-mails without having to first log in .