(context)
return {
        'auth_link': auth_url,
        'auth_icon_class': auth_icon_class,
        'auth_link_text': auth_link_text
    }
Render logout link.
Render logout link.
Render logout link .
def render_auth_link(context):
    """Render logout link."""
    if not DISPLAY_AUTH_LINK:
        return {}

    request = context.get('request', None)
    user_is_authenticated = request.user.is_authenticated

    if request and user_is_authenticated:
        try:
            auth_url = settings.LOGOUT_URL
            auth_icon_class = 'icon-signout'
            auth_link_text = _('Log out')
        except Exception as e:
            auth_url = ''
            auth_icon_class = ''
            auth_link_text = ''
    else:
        try:
            auth_url = settings.LOGIN_URL
            auth_icon_class = 'icon-signin'
            auth_link_text = _('Log in')
        except Exception as e:
            auth_url = ''
            auth_icon_class = ''
            auth_link_text = ''

    return {
        'auth_link': auth_url,
        'auth_icon_class': auth_icon_class,
        'auth_link_text': auth_link_text
    }
def render_auth_link ( context ) : if not DISPLAY_AUTH_LINK : return { } request = context . get ( 'request' , None ) user_is_authenticated = request . user . is_authenticated if request and user_is_authenticated : try : auth_url = settings . LOGOUT_URL auth_icon_class = 'icon-signout' auth_link_text = _ ( 'Log out' ) except Exception as e : auth_url = '' auth_icon_class = '' auth_link_text = '' else : try : auth_url = settings . LOGIN_URL auth_icon_class = 'icon-signin' auth_link_text = _ ( 'Log in' ) except Exception as e : auth_url = '' auth_icon_class = '' auth_link_text = '' return { 'auth_link' : auth_url , 'auth_icon_class' : auth_icon_class , 'auth_link_text' : auth_link_text }