From 00e0868dc17684ac8f5bd3086005f4b792a6c85e Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Sat, 29 Aug 2020 14:54:55 +0200 Subject: remove delay for js to load --- server/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/views.py b/server/views.py index 2f601e6..cdc1b74 100644 --- a/server/views.py +++ b/server/views.py @@ -221,7 +221,7 @@ def ulist(request): # render context html = template.render(context) # render pdf using wkhtmltopdf - pdf = pdfkit.from_string(html, False, options={'javascript-delay':'5000', 'no-stop-slow-scripts':False}) + pdf = pdfkit.from_string(html, False) result = BytesIO(pdf) result.seek(0) return FileResponse(result, filename=document.user.username+"_"+document.document_type.name+".pdf") @@ -601,7 +601,7 @@ def doclist(request): context = {'doc': doc, 'vac': vac_file, 'health': health_file, 'sign_doc_file': sign_doc_file} html = template.render(context) - pdf = pdfkit.from_string(html, False, options={'javascript-delay':'5000', 'no-stop-slow-scripts':False}) + pdf = pdfkit.from_string(html, False) result = BytesIO(pdf) result.seek(0) return FileResponse(result, filename=document.user.username+"_"+document.document_type.name+".pdf") -- cgit v1.2.1