aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2022-08-07 14:56:43 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2022-08-07 14:56:43 +0200
commitd495a25022e1b4bd1b3269f7971b959ce731541c (patch)
tree600f30b509569a1eec552f389a244cd1ca695aa5 /client
parentbar code scanner inside direct approve page (diff)
downloadscout-subs-d495a25022e1b4bd1b3269f7971b959ce731541c.tar.gz
scout-subs-d495a25022e1b4bd1b3269f7971b959ce731541c.zip
get base url from settings
Diffstat (limited to '')
-rw-r--r--client/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/views.py b/client/views.py
index 3ddc417..deeb93c 100644
--- a/client/views.py
+++ b/client/views.py
@@ -7,7 +7,7 @@ from django.http import HttpResponse, HttpResponseRedirect, FileResponse
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from accounts.views import copy_from_midata
-from django.conf import settings
+from django.conf import Settings, settings
from io import BytesIO
import pdfkit
@@ -58,7 +58,7 @@ def index(request):
if request.POST["action"][0] == 'f':
# generate approve pdf
template = get_template('client/approve_doc_pdf.html')
- context = {'doc': document, 'uri': request.build_absolute_uri(reverse('approve_direct')) + "?code=" + str(document.code)}
+ context = {'doc': document, 'uri': settings.FQD_BASE_URL + reverse('approve_direct') + "?code=" + str(document.code)}
html = template.render(context)
pdf = pdfkit.from_string(html, False)
result = BytesIO(pdf)