cell color Django-Tables2
问题 Question: Where do I edit my django code to change the background color of individual cells based on business logic? In my views.py I have logic that captures the max value of column 'pts': def show_teams(request): reg = Teamoffense.objects.filter(~Q(rk='RK')) pts = Teamoffense.objects.filter(~Q(pts='PTS')).values('pts') seq = [item['pts'] for item in pts] maxseq = max(seq) table = SimpleTable(reg) table_to_report = RequestConfig(request).configure(table) if table_to_report: return create