From 6aab6f8064df4fc4bdcd27b5c7fcb9934f04fbbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20Porto?= Date: Thu, 14 Sep 2023 01:13:38 -0300 Subject: [PATCH] Adding social media metric --- metrics/views.py | 2 +- report/templates/report/detail_report.html | 6 ++++++ report/templates/report/quantitative.html | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/metrics/views.py b/metrics/views.py index 82da7dd..166797c 100644 --- a/metrics/views.py +++ b/metrics/views.py @@ -61,7 +61,7 @@ def show_metrics_per_project(request): def get_metrics_and_aggregate_per_project(): aggregated_metrics_and_results = {} - for project in Project.objects.all(): + for project in Project.objects.filter(pk=7):#all(): project_metrics = [] for activity in Activity.objects.filter(area__project=project): activity_metrics = {} diff --git a/report/templates/report/detail_report.html b/report/templates/report/detail_report.html index bbe5920..a3ed384 100644 --- a/report/templates/report/detail_report.html +++ b/report/templates/report/detail_report.html @@ -128,6 +128,12 @@

{% trans "Quantitative" %}

{{ data.feedbacks }}
{% endif %} + {% if data.number_of_people_reached_through_social_media %} +
+
{% trans "Number of people reached through social media" %}
+
{{ data.number_of_people_reached_through_social_media }}
+
+ {% endif %} {% if data.editors.count %}
{% trans "Editors" %}
diff --git a/report/templates/report/quantitative.html b/report/templates/report/quantitative.html index 573d256..7c9229d 100644 --- a/report/templates/report/quantitative.html +++ b/report/templates/report/quantitative.html @@ -21,7 +21,7 @@
- +