aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/views.py
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-07-28 20:40:06 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-07-28 20:40:06 +0200
commit8c8981891e1fccc4a4491ffe02c26a9d4279f0e6 (patch)
tree7f73b6ae37bfa9edf43aae177e6b4fb0b66feb4c /accounts/views.py
parentabout page and licence (diff)
downloadscout-subs-8c8981891e1fccc4a4491ffe02c26a9d4279f0e6.tar.gz
scout-subs-8c8981891e1fccc4a4491ffe02c26a9d4279f0e6.zip
local font feching, list for non interactive items
Diffstat (limited to '')
-rw-r--r--accounts/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/accounts/views.py b/accounts/views.py
index cc402d2..23f4212 100644
--- a/accounts/views.py
+++ b/accounts/views.py
@@ -40,12 +40,18 @@ def personal(request):
if medic.vac_certificate != None:
filename = os.path.basename(medic.vac_certificate.name)
filename = filename[filename.find("_")+1:]
+ if filename.rfind('.') != -1:
+ filename = filename[:filename.rfind('.')]
+ filename = filename + ".jpg"
return FileResponse(medic.vac_certificate.file, as_attachment=True, filename=filename)
if request.POST['action'] == "download_health":
if medic.health_care_certificate != None:
filename = os.path.basename(medic.health_care_certificate.name)
filename = filename[filename.find("_")+1:]
+ if filename.rfind('.') != -1:
+ filename = filename[:filename.rfind('.')]
+ filename = filename + ".jpg"
return FileResponse(medic.health_care_certificate.file, as_attachment=True, filename=filename)
request.user.first_name = request.POST["first_name"]