added sample document, added no confidential data

This commit is contained in:
2025-06-13 19:36:06 +02:00
parent 5563c9b8a8
commit 41e9490e30
6 changed files with 159 additions and 4 deletions

View File

@@ -11,9 +11,10 @@ from .tables import risk_matrix_table ,get_risk_table, get_safeguard_summary_tab
from django.conf import settings
site_domain = settings.SITE_DOMAIN
from .processors import render_template
from django.http import JsonResponse
from django.http import JsonResponse, FileResponse, Http404
from django.core.exceptions import ValidationError
from django.core.validators import validate_email
import os
@@ -120,4 +121,14 @@ def payment_page(request):
send_document_email(email, pdf_url, document)
return redirect(pdf_url)
return render(request, "payment.html", {"email": email})
return render(request, "payment.html", {"email": email})
def no_confidential_data(request):
return render(request, "no_confidential_data.html")
def download_example_pdf(request):
pdf_path = os.path.join(settings.BASE_DIR, 'backend/core/static/pdf/risklet_example_document.pdf')
if not os.path.exists(pdf_path):
raise Http404("File not found.")
return FileResponse(open(pdf_path, 'rb'), as_attachment=True, filename='risklet_example_document.pdf')