ActionColumn

class bootlace.table.ActionColumn(heading: str | ~bootlace.util.T, name: str | None = None, endpoint: str | ~bootlace.endpoint.Endpoint = Endpoint(.edit), label: ~bootlace.util.Taggable | ~dominate.dom_tag.dom_tag | str | ~collections.abc.Iterable[~bootlace.util.Taggable | ~dominate.dom_tag.dom_tag] = None, a: ~bootlace.util.Tag = Tag(tag=<class 'dominate.tags.a'>, classes=set(), attributes={}))[source]

Bases: ColumnBase

A column which links to a view for the value.

This is commonly shown as e.g. the name of the item, which links to the edit view.

Attributes Summary

a

attribute

The attribute name for the column.

endpoint

heading

The heading for the column

label

name

td

th

Methods Summary

attribute_value(value)

Return the value of the attribute for the given object.

cell(value)

Return the cell for the column as an HTML tag.

contents(value[, format])

Return the contents of the cell for the column, using an HTML comment if the attribute value is None.

Attributes Documentation

a: Tag
attribute

The attribute name for the column.

endpoint: Endpoint
heading: Heading

The heading for the column

label: Taggable | dom_tag | str | Iterable[Taggable | dom_tag]
name: str | None
td = Tag(tag=<class 'dominate.tags.td'>, classes=set(), attributes={})
th = Tag(tag=<class 'dominate.tags.th'>, classes=set(), attributes={})

Methods Documentation

attribute_value(value: Any) Any

Return the value of the attribute for the given object.

cell(value: Any) html_tag[source]

Return the cell for the column as an HTML tag.

contents(value: Any, format: str | None = None) Any

Return the contents of the cell for the column, using an HTML comment if the attribute value is None.