我正在开发一个Django应用程序,我需要在模板中显示当前考试的直方图,问题是如果我看到多个考试,图像会重叠。我将在下面的图片中显示。
这是与我检查的第一次检查相对应的直方图
有人知道为什么会这样吗?发布图像显示代码
def showImage(request,exam_id):
imagePath = '/home/luis/Documentos/projeto/media/examshist/hist'+exam_id+'.png'
Image.init()
i = Image.open(imagePath)
response = HttpResponse(content_type='image/png')
i.save(response,'PNG')
return response