Humanizing django-tables2 output?
1 answer
You can import a filter intcomma
and define a personalized rendering method for the column that uses it.
from django.contrib.humanize.templatetags.humanize import intcomma
class ProductMaxIPPortEldCountMonthlyTable(tables.Table):
ip_count = tables.Column()
def render_ip_count(self, value):
return intcomma(value)
+3
source to share