TabError:缩进中制表符和空格的使用不一致
class DownloadPDF(View):
def get(self, request, *args, **kwargs):
patientInfo.objects.all()
# data.update({'Pregencies':pInfo.Pregencies,'Glucose':Glucose,'BloodPressure':BloodPressure,'SkinThickness':SkinThickness,'Insulin':Insulin,'BMI':BMI,'DiabetesPedigreeFunction':DiabetesPedigreeFunction,'Age':Age,'username':request.user,'result':predict})
pdf = render_to_pdf('accounts/pdf_template.html', data)
response = HttpResponse(pdf, content_type='application/pdf')
filename = "Invoice_%s.pdf" %("12341231")
content = "attachment; filename='%s'" %(filename)
response['Content-Disposition'] = content
return response
目前没有回答
相关问题 更多 >
编程相关推荐