aboutsummaryrefslogtreecommitdiff
path: root/app/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/views.py')
-rw-r--r--app/views.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/views.py b/app/views.py
index fd44f6d..5b105ed 100644
--- a/app/views.py
+++ b/app/views.py
@@ -156,7 +156,17 @@ def status():
AndroidModel = "/static/uploads/3DModels/" + str(jobID) + ".gltf"
iOSModel = "/static/uploads/3DModels/" + str(jobID) + ".usdz"
- return render_template('job_status.html',ID=jobID,pn=protein_name,ln=ligand_name,subDate=date,desc=description,status=done,PDFReport=PDFReport,AndroidModel=AndroidModel,iOSModel=iOSModel)
+ uploadsFolder = os.path.join(base,"app/static/uploads/")
+ if os.path.exists(os.path.join(uploadsFolder,"reports",str(jobID)+".pdf")):
+ reportDone = 'exists'
+ else:
+ reportDone = False
+ if os.path.exists(os.path.join(uploadsFolder,"3DModels",str(jobID)+".gltf")):
+ ModelDone = 'exists'
+ else:
+ ModelDone = False
+
+ return render_template('job_status.html',ID=jobID,pn=protein_name,ln=ligand_name,subDate=date,desc=description,status=done,model=ModelDone,report=reportDone,PDFReport=PDFReport,AndroidModel=AndroidModel,iOSModel=iOSModel)
flash_errors(taskStatusForm)
return render_template('job_status_form.html',form=taskStatusForm)