jeudi 26 décembre 2019

Passing the image attribute of a model in a function in Django

I have a function called detectFace(input_file), where the input file is an Image. I want to render the results via views.py on a template but could not find a way to do it. The image will be uploaded via the template and will run on the detectFace(input_file).

something like this:-

def detectFace(input_file):
    """Operation on input_file
    """
    pass

Now in views.py I am trying to creating something like this

def face_recog(request):
    context = ??
    return render(request, 'templates/face.html', context)

I want to know those question marks. How should I proceed?




Aucun commentaire:

Enregistrer un commentaire