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)
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'