(request, path)
return proxy_view(request, url, requests_args={
        'headers': headers,
        'allow_redirects': False,
        'cookies': cookies
    })
A small proxy for a Shareabouts API server, exposing only
    user authentication.
A small proxy for a Shareabouts API server, exposing only
    user authentication.
A small proxy for a Shareabouts API server exposing only user authentication .
def users(request, path):
    """
    A small proxy for a Shareabouts API server, exposing only
    user authentication.
    """
    if settings.SHAREABOUTS.get('DATASET_ROOT').startswith('file://'):
        return readonly_response(request, None)

    root = make_auth_root(settings.SHAREABOUTS.get('DATASET_ROOT'))
    api_key = settings.SHAREABOUTS.get('DATASET_KEY')
    api_session_cookie = request.COOKIES.get('sa-api-session')

    url = make_resource_uri(path, root)
    headers = {'X-Shareabouts-Key': api_key} if api_key else {}
    cookies = {'sessionid': api_session_cookie} if api_session_cookie else {}
    return proxy_view(request, url, requests_args={
        'headers': headers,
        'allow_redirects': False,
        'cookies': cookies
    })
def users ( request , path ) : if settings . SHAREABOUTS . get ( 'DATASET_ROOT' ) . startswith ( 'file://' ) : return readonly_response ( request , None ) root = make_auth_root ( settings . SHAREABOUTS . get ( 'DATASET_ROOT' ) ) api_key = settings . SHAREABOUTS . get ( 'DATASET_KEY' ) api_session_cookie = request . COOKIES . get ( 'sa-api-session' ) url = make_resource_uri ( path , root ) headers = { 'X-Shareabouts-Key' : api_key } if api_key else { } cookies = { 'sessionid' : api_session_cookie } if api_session_cookie else { } return proxy_view ( request , url , requests_args = { 'headers' : headers , 'allow_redirects' : False , 'cookies' : cookies } )