(request)
return response
Index page
Index page
Index page
def index(request):
    """Index page"""
    response = render(request, 'pygmy/index.html')
    if (request.COOKIES.get(AUTH_COOKIE_NAME) and
            request.COOKIES.get('refresh_token')):
        pygmy_client = pygmy_client_object(settings, request)
        access_token = pygmy_client.refresh_access_token()
        response.set_cookie(
            AUTH_COOKIE_NAME, access_token.get(AUTH_COOKIE_NAME))
    return response
def index ( request ) : response = render ( request , 'pygmy/index.html' ) if ( request . COOKIES . get ( AUTH_COOKIE_NAME ) and request . COOKIES . get ( 'refresh_token' ) ) : pygmy_client = pygmy_client_object ( settings , request ) access_token = pygmy_client . refresh_access_token ( ) response . set_cookie ( AUTH_COOKIE_NAME , access_token . get ( AUTH_COOKIE_NAME ) ) return response