Display thousand commas in numeric dashboard

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-07-29 02:36:57 -04:00
parent 3988dedebf
commit a3a78f755d
3 changed files with 7 additions and 1 deletions

View File

@@ -66,6 +66,8 @@
- Add web links app.
- Add support to display column help text
as a tooltip.
- Update numeric dashboard widget to display
thousand commas.
3.2.6 (2019-07-10)
==================

View File

@@ -81,6 +81,8 @@ Changes
- Add web links app.
- Add support to display column help text
as a tooltip.
- Update numeric dashboard widget to display
thousand commas.
Removals
--------

View File

@@ -1,5 +1,6 @@
from __future__ import unicode_literals
from django.contrib.humanize.templatetags.humanize import intcomma
from django.template import loader
@@ -85,7 +86,8 @@ class DashboardWidgetNumeric(BaseDashboardWidget):
def get_context(self):
return {
'count': self.count,
'count': intcomma(value=self.count),
'count_raw': self.count,
'icon_class': self.icon_class,
'label': self.label,
'link': self.link,