]> git.0d.be Git - django-panik-nonstop.git/commitdiff
include percentage signs
authorFrédéric Péters <fpeters@0d.be>
Mon, 6 Apr 2015 13:29:02 +0000 (15:29 +0200)
committerFrédéric Péters <fpeters@0d.be>
Mon, 6 Apr 2015 13:29:02 +0000 (15:29 +0200)
nonstop/views.py

index 8d4269492ff5b90f89c310bf35c67bfca1bcfa8d..0978dbcc883fdaecad4f0e6602b09fc9669d0dd1 100644 (file)
@@ -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'