Changed ratios to percentages

reminder
Etzelia 2018-12-05 17:01:50 -06:00 committed by John Olheiser
parent 611c4e1934
commit 9f3d7e7ae3
2 changed files with 6 additions and 6 deletions

View File

@ -43,10 +43,10 @@ def overview_data():
# Ratios
data['ratio'] = {
'accepted': data['total']['application']['accepted'] /
data['total']['application']['denied'] if data['total']['application']['denied'] != 0 else 1,
'banned': data['total']['player']['banned'] /
data['total']['player']['unbanned'] if data['total']['player']['unbanned'] != 0 else 1
'accepted': (data['total']['application']['accepted'] /
data['total']['application']['denied'] if data['total']['application']['denied'] != 0 else 1) * 100,
'banned': (data['total']['player']['banned'] /
data['total']['player']['unbanned'] if data['total']['player']['unbanned'] != 0 else 1) * 100
}
return data

View File

@ -40,10 +40,10 @@
<hr/>
<div class="row">
<div class="col-xs-9 col-md-6">
<h3>Acceptance Rate: {{ data.ratio.accepted }}</h3>
<h3>Acceptance Rate: {{ data.ratio.accepted }}%</h3>
</div>
<div class="col-xs-9 col-md-6">
<h3>Ban Rate: {{ data.ratio.banned }}</h3>
<h3>Ban Rate: {{ data.ratio.banned }}%</h3>
</div>
</div>
</div>