From f3c9297ffdf754d273012e236f63ae689208edb4 Mon Sep 17 00:00:00 2001 From: sergiogimenez Date: Tue, 19 Nov 2024 08:27:44 +0100 Subject: [PATCH] [WIP] Add button for exporting to PDF --- device/templates/details.html | 6 ++++++ device/urls.py | 2 ++ device/views.py | 3 +++ 3 files changed, 11 insertions(+) diff --git a/device/templates/details.html b/device/templates/details.html index 6fdefb9..9c03aa4 100644 --- a/device/templates/details.html +++ b/device/templates/details.html @@ -234,6 +234,12 @@
+ {% comment %}
Environmental Impact Assessment
{% endcomment %}
diff --git a/device/urls.py b/device/urls.py index a56aa29..78922c1 100644 --- a/device/urls.py +++ b/device/urls.py @@ -10,5 +10,7 @@ urlpatterns = [ path("/annotation/add", views.AddAnnotationView.as_view(), name="add_annotation"), path("/document/add", views.AddDocumentView.as_view(), name="add_document"), path("/public/", views.PublicDeviceWebView.as_view(), name="device_web"), + path('/export-environmental-impact-pdf/', + views.ExportEnvironmentalImpactPDF.as_view(), name='export_environmental_impact_pdf'), ] diff --git a/device/views.py b/device/views.py index 1deb795..bdd4f9e 100644 --- a/device/views.py +++ b/device/views.py @@ -169,6 +169,9 @@ class PublicDeviceWebView(TemplateView): return JsonResponse(device_data) +class ExportEnvironmentalImpactPDF(DashboardView, TemplateView): + pass + class AddAnnotationView(DashboardView, CreateView): template_name = "new_annotation.html" title = _("New annotation")