diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-07-21 21:47:09 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-07-21 21:47:09 +0200 |
commit | a531c5e12a65ac7c216bb3f91e510c1d31fbb06e (patch) | |
tree | c306bfc36f54815759cfe4b15b8f296865e2b70e /client/views.py | |
parent | modify gitignore (diff) | |
download | scout-subs-a531c5e12a65ac7c216bb3f91e510c1d31fbb06e.tar.gz scout-subs-a531c5e12a65ac7c216bb3f91e510c1d31fbb06e.zip |
static files, last improvements0.1
Diffstat (limited to '')
-rw-r--r-- | client/views.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/views.py b/client/views.py index f215e7e..6cc7a15 100644 --- a/client/views.py +++ b/client/views.py @@ -36,6 +36,9 @@ def index(request): if document.user != request.user: return + if document.status == "ok" or document.status == "archive": + return + if request.POST["action"][0] == 'f': template = get_template('client/approve_doc_pdf.html') context = {'doc': document} @@ -46,8 +49,9 @@ def index(request): return FileResponse(result, as_attachment=True, filename=document.document_type.name+".pdf") elif request.POST["action"][0] == 'a': - document.status = "ok" - document.save() + if document.status == "autosign": + document.status = "ok" + document.save() elif request.POST["action"][0] == 'd': document.delete() elif request.POST["action"][0] == 'e': @@ -73,6 +77,8 @@ def index(request): for i in documents: personal = None medical = None + vac_file = "" + health_file = "" if i.document_type.personal_data: personal = i.personal_data if i.document_type.medical_data: |