use percents in worldcup loserboard

pull/31/head
Aevann1 2022-11-29 02:31:55 +02:00
parent be8be13a01
commit 80b8a5b786
1 changed files with 3 additions and 2 deletions

View File

@ -22,8 +22,9 @@
<td data-sort-key="{{user.username.lower() if user else ''}}">{%- include 'user_in_table.html' -%}</td>
<td>{{r[1]}}</td>
<td>{{r[2]}}</td>
{% set ratio = (r[1]/r[2])|string %}
<td data-sort-key="{{ratio[:3]}}">{{ratio[:3]}}</td>
{% set ratio = r[1]/r[2] %}
{% set percent = (ratio*100)|string %}
<td data-sort-key="{{ratio}}">{{percent[:3].replace('0.0', '0').replace('.', '')}}%</td>
<td>{{r[3]}}</td>
</tr>
{% endfor %}