Skip to content

Commit

Permalink
Adding social media metric
Browse files Browse the repository at this point in the history
  • Loading branch information
Ederporto committed Sep 14, 2023
1 parent 6bb2a8d commit 6aab6f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion metrics/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down
6 changes: 6 additions & 0 deletions report/templates/report/detail_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ <h3 id="Quantitative">{% trans "Quantitative" %}</h3>
<div class="w3-twothird formfield view-field">{{ data.feedbacks }}</div>
</div>
{% endif %}
{% if data.number_of_people_reached_through_social_media %}
<div class="w3-row">
<div class="w3-third formfieldtitle">{% trans "Number of people reached through social media" %}</div>
<div class="w3-twothird formfield view-field">{{ data.number_of_people_reached_through_social_media }}</div>
</div>
{% endif %}
{% if data.editors.count %}
<div class="w3-row">
<div class="w3-third formfieldtitle">{% trans "Editors" %}</div>
Expand Down
2 changes: 1 addition & 1 deletion report/templates/report/quantitative.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
<div class="w3-quarter formfield form-right">
<label class="formfieldtitle" for="number_of_people_reached_through_social_media">{% translate "Number of people reached through social media" %}</label>
<input type="number" min="0" value="{{ report_form.instance.number_of_people_reached_through_social_media }}" id="number_of_people_reached_through_social_media" name="social media"/>
<input type="number" min="0" value="{{ report_form.instance.number_of_people_reached_through_social_media }}" id="number_of_people_reached_through_social_media" name="number_of_people_reached_through_social_media"/>
</div>
</div>
<div class="w3-row">
Expand Down

0 comments on commit 6aab6f8

Please sign in to comment.