added sample document, added no confidential data
This commit is contained in:
@@ -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')
|
||||
Reference in New Issue
Block a user