1

django-tables2 has a render_foo method that can be defined for each individual column in the table. I wish to avoid a lot of repetitive coding defining a function for each and every column in every table I want to format cells...

Does this package have some way to render_AllColumns? Anything that does this:

class simpleTable(tables.Table):
    def render_AllColumns(self, value, column):
        if value == max(column):
            #set column attributes
        else:
            #set other column attributes
        return value

I posted about the single column method here

Community
  • 1
  • 1
Krusaderjake
  • 479
  • 1
  • 7
  • 19

1 Answers1

0

Currently, there is no documented/nice way to do this. We have an issue suggesting something you could maybe use, which also points out a workaround.

Jieter
  • 4,101
  • 1
  • 19
  • 31