Exemplo n.º 1
0
def feature_get(oauth_request, storage, feature_id, extension, is_public):

    if extension == "csv":
        return status_.status_415("We do not support exporting a single item as a CSV file."), 415

    Feature_ = Feature()
    Feature_.current_user = oauth_request.user
    feature = Feature_.feature_get(storage, feature_id)

    if type(feature) is tuple:
        return feature

    arguments = {"the_content": feature, "extension": extension, "code": 200}

    return Feature_.endpoint_response(**arguments)