Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions analytics/site/conversionadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.db.models.query import QuerySet
from django.template.response import TemplateResponse
from django.utils.translation import gettext_lazy as _
from django.utils.safestring import mark_safe

from analytics.site.requeststatadmin import BaseRequestStatAdmin
from analytics.utils.helpers import get_values_over_time
Expand Down Expand Up @@ -53,7 +54,10 @@ def create_context_data(self, request: WSGIRequest,
total_won_deals,
'receipt_date'
)
title = _('Conversion') + f' ({conversion} %)'
title = mark_safe(
f"{_('Conversion')} ({conversion} %)<br><br>"
f"{_('Total requests')} = {total_requests_count}"
)
conversion_over_time = list(map(
lambda x, y:
{
Expand Down Expand Up @@ -93,7 +97,10 @@ def create_context_data(self, request: WSGIRequest,
)
self.add_chart_data(
response,
f"{conversion_of_primary_requests_str} ({primary_conversion} %)",
mark_safe(
f"{conversion_of_primary_requests_str} ({primary_conversion} %)<br><br>"
f"{_('Total primary requests')} = {primary_requests_count}"
),
primary_conversion_over_time,
max_value2
)
Expand Down
3 changes: 0 additions & 3 deletions analytics/templates/analytics/summary_change_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ <h1>{{ page_title }}</h1>
{% endblock %}
{% block result_list %}
<div>
{% for n, v in summary.items %}
<p>{{ n }} = {{ v }}</p>
{% endfor %}
{% include "analytics/data_table.html" %}
{% include "analytics/bar_chart.html" %}
</div>
Expand Down