(self, th_attrs)
return None if len(classes) == 0 else " ".join(sorted(classes))
Returns the HTML class attribute for a header cell in this column
Returns the HTML class attribute for a header cell in this column
Returns the HTML class attribute for a header cell in this column
def get_th_class(self, th_attrs):
        """
        Returns the HTML class attribute for a header cell in this column
        """
        classes = self._get_cell_class(th_attrs)

        # add classes for ordering
        ordering_class = th_attrs.get("_ordering", {})
        if self.orderable:
            classes.add(ordering_class.get("orderable", "orderable"))
        if self.is_ordered:
            classes.add(
                ordering_class.get("descending", "desc")
                if self.order_by_alias.is_descending
                else ordering_class.get("ascending", "asc")
            )

        return None if len(classes) == 0 else " ".join(sorted(classes))
def get_th_class ( self , th_attrs ) : classes = self . _get_cell_class ( th_attrs ) # add classes for ordering ordering_class = th_attrs . get ( "_ordering" , { } ) if self . orderable : classes . add ( ordering_class . get ( "orderable" , "orderable" ) ) if self . is_ordered : classes . add ( ordering_class . get ( "descending" , "desc" ) if self . order_by_alias . is_descending else ordering_class . get ( "ascending" , "asc" ) ) return None if len ( classes ) == 0 else " " . join ( sorted ( classes ) )