Commit 68310060 authored by fred's avatar fred

compute percentages as float numbers

parent 274de2fe
......@@ -71,7 +71,7 @@ class ZoneStats(object):
total = self.count()
if total == 0:
return '-'
return '%.2f%%' % (100 * self.count(**kwargs) / total)
return '%.2f%%' % (100. * self.count(**kwargs) / total)
def instru(self):
return self.count(instru=True)
......@@ -98,7 +98,7 @@ class ZoneStats(object):
considered_tracks = self.count() - self.instru()
if considered_tracks == 0:
return '-'
return '%.2f%%' % (100 * self.french() / considered_tracks)
return '%.2f%%' % (100. * self.french() / considered_tracks)
class StatisticsView(TemplateView):
template_name = 'nonstop/statistics.html'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment