sandbox/views.py
def head(self, _, env):
        """Returns a response with status 200 if the environment <env> exists, 404 otherwise."""
        path = utils.get_env(env)
        if path is None:
            return HttpResponseNotFound(f"No environment with UUID '{env}' found")
        
        response = HttpResponse()
        response["Content-Length"] = os.stat(path).st_size
        response['Content-Type'] = "application/gzip"
        response['Content-Disposition'] = f"attachment; filename={env}.tgz"
        return response
Returns a response with status 200 if the environment <env> exists, 404 otherwise.
Returns a response with status 200 if the environment  exists, 404 otherwise.
Returns a response with status 200 if the environment exists 404 otherwise .
def head(self, _, env):
        path = utils.get_env(env)
        if path is None:
            return HttpResponseNotFound(f"No environment with UUID '{env}' found")
        response = HttpResponse()
        response["Content-Length"] = os.stat(path).st_size
        response['Content-Type'] = "application/gzip"
        response['Content-Disposition'] = f"attachment; filename={env}.tgz"
        return response
def head ( self , _ , env ) : path = utils . get_env ( env ) if path is None : return HttpResponseNotFound ( f"No environment with UUID '{env}' found" ) response = HttpResponse ( ) response [ "Content-Length" ] = os . stat ( path ) . st_size response [ 'Content-Type' ] = "application/gzip" response [ 'Content-Disposition' ] = f"attachment; filename={env}.tgz" return response
Returns a response with status 200 if the environment <env> exists, 404 otherwise.
Returns a response with status 200 if the environment <env > exists 404 otherwise .
"""Returns a response with status 200 if the environment <env> exists, 404 otherwise."""
self
_
env