diff options
Diffstat (limited to '')
-rw-r--r-- | client/views.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client/views.py b/client/views.py index 4bc7e0e..8b0ac7b 100644 --- a/client/views.py +++ b/client/views.py @@ -12,6 +12,8 @@ from io import BytesIO import pdfkit import base64 from subprocess import check_output +from datetime import datetime +import pytz def index(request): @@ -247,6 +249,10 @@ def edit_wrapper(request, context): if document.user != request.user: return + # update compilation date + document.compilation_date = pytz.timezone('Europe/Zurich').localize(datetime.now()) + document.save(update_fields=["compilation_date"]) + # save again all data usercode = UserCode.objects.filter(user=document.user)[0] |