Coverage for circuits/tables/columns.py: 88%
8 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-10 18:35 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-10 18:35 +0000
1import django_tables2 as tables
3__all__ = (
4 'CommitRateColumn',
5)
8class CommitRateColumn(tables.TemplateColumn):
9 """
10 Humanize the commit rate in the column view
11 """
12 template_code = """
13 {% load helpers %}
14 {{ record.commit_rate|humanize_speed }}
15 """
17 def __init__(self, *args, **kwargs):
18 super().__init__(template_code=self.template_code, *args, **kwargs)
20 def value(self, value):
21 return str(value) if value else None