From 6ee0184f6625b02c3a9fbcb47590382cab0aa775 Mon Sep 17 00:00:00 2001 From: sergiogimenez Date: Tue, 25 Feb 2025 09:51:04 +0100 Subject: [PATCH] Add algorithm docs --- .../templates/tabs/environmental_impact.html | 19 ++++++++++++++++++- .../algorithms/algorithm_interface.py | 2 +- .../algorithms/docs_renderer.py | 8 ++++++++ .../algorithms/dummy_algo/dummy_calculator.py | 10 ++++++++-- environmental_impact/models.py | 1 + 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 environmental_impact/algorithms/docs_renderer.py diff --git a/device/templates/tabs/environmental_impact.html b/device/templates/tabs/environmental_impact.html index 251f8f4..f7f7b8f 100644 --- a/device/templates/tabs/environmental_impact.html +++ b/device/templates/tabs/environmental_impact.html @@ -1,6 +1,6 @@ {% load i18n %} -
+
{% trans 'Environmental Impact Details' %}

@@ -17,4 +17,21 @@
{{ impact.co2_emissions|default:'0.0' }} kg
+ +
+ + +
+
+
+ {{ impact.docs|safe }} +
+
+
+
+ + +