When using django as a backend, I have an image saved in the database in ImageField format, and in the view layer I get the object via orm, how can I return it to my vue frontend.
I turned the ImageField object into a string to return a JsonResponse, but the front-end only gets the name of the image when it's read
def getContent(request):
mtitle=request.GET.get('title')
row_obj=models.content.objects.filter(title=mtitle).first()
res={
"pic":str(row_obj.img),
}
print(type(row_obj.img))
return JsonResponse(res, json_dumps_params={"ensure_ascii": False})
How do I request the image to be displayed on the front end?