Merge branch 'feature/statistic/month_name_bug' into 'develop'

Feature/statistic/month name bug

See merge request 2020-2021/online/s101/group-02/access_controller!90
This commit is contained in:
Кравченко Артем 2021-05-27 21:45:06 +00:00
commit 547b318d1b
2 changed files with 5 additions and 0 deletions

View File

@ -88,7 +88,11 @@
<tr>
<td scope="col">&nbsp;</td>
{% for date in log_stats.keys %}
{% if interval == 'days' %}
<td scope="col">{{ date | date:'d.m' }}</td>
{% else %}
<td scope="col">{{ date.1 | date:'F' }}</td>
{% endif %}
{% endfor %}
</tr>
</thead>

View File

@ -447,6 +447,7 @@ def statistic_page(request: WSGIRequest) -> HttpResponse:
context['errors'] = data.errors
if data.warnings:
context['warnings'] = data.warnings
context['interval'] = data.interval
context['log_stats'] = stats if not context['errors'] else None
elif request.method == 'GET':
form = StatisticForm()