(request, uid)
return HttpResponse(content=payload, content_type="text/json")
GET request : return project name, text, and image as a JSON file.
    POST request : change project name, text, and image given a JSON file.
GET request : return project name, text, and image as a JSON file.
    POST request : change project name, text, and image given a JSON file.
GET request : return project name text and image as a JSON file . POST request : change project name text and image given a JSON file .
def recipe_api(request, uid):
    """
    GET request : return project name, text, and image as a JSON file.
    POST request : change project name, text, and image given a JSON file.
    """

    recipe = Analysis.objects.filter(uid=uid).first()
    if not recipe:
        return HttpResponse(content="Recipe does not exist", status=404)

    # Get the json data with project info
    payload = encode_recipe(recipe, show_image=True)

    return HttpResponse(content=payload, content_type="text/json")
def recipe_api ( request , uid ) : recipe = Analysis . objects . filter ( uid = uid ) . first ( ) if not recipe : return HttpResponse ( content = "Recipe does not exist" , status = 404 ) # Get the json data with project info payload = encode_recipe ( recipe , show_image = True ) return HttpResponse ( content = payload , content_type = "text/json" )