diff --git a/app/__init__.py b/app/__init__.py index e1ce3ccd5..fc9ad0a2d 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -38,6 +38,7 @@ from app.config import configs from app.extensions import antivirus_client, redis_client, zendesk_client from app.formatters import ( convert_to_boolean, + format_billions, format_date, format_date_human, format_date_normal, @@ -527,6 +528,7 @@ def setup_event_handlers(): def add_template_filters(application): for fn in [ + format_billions, format_datetime, format_datetime_24h, format_datetime_normal, diff --git a/app/formatters.py b/app/formatters.py index 2f9223a44..612e45113 100644 --- a/app/formatters.py +++ b/app/formatters.py @@ -515,3 +515,7 @@ def format_mobile_network(network): if network in ('three', 'vodafone', 'o2'): return network.capitalize() return 'EE' + + +def format_billions(count): + return humanize.intword(count) diff --git a/app/templates/views/performance.html b/app/templates/views/performance.html index 20e70551b..05235134c 100644 --- a/app/templates/views/performance.html +++ b/app/templates/views/performance.html @@ -22,28 +22,28 @@