Table¶
Base class: Part
Describe a table. Example:
class FooTable(Table):
a = Column()
b = Column()
class Meta:
sortable = False
attrs__style = 'background: green'
Refinable members¶
action_class
Type:
Type[iommi.action.Action]
actions_below
Type:
bool
actions_template
Type:
Union[str, iommi._web_compat.Template]
after
Type:
Union[int, str]
assets
Type:
Namespace
attrs
dict of strings to string/callable of HTML attributes to apply to the table
Type: Attrs
HOWTO: How do I customize HTML attributes, CSS classes or CSS style specifications?
bulk
Type:
Union[iommi.form.Form, NoneType]
HOWTO: How do I enable bulk delete?
bulk_container
Type: Fragment
bulk_exclude
exclude filters to apply to the
QuerySet
before performing the bulk operationType:
Namespace
bulk_filter
filters to apply to the
QuerySet
before performing the bulk operationType:
Namespace
cell
Type:
CellConfig
columns
(use this only when not using the declarative style) a list of Column objects
container
Type: Fragment
default_sort_order
empty_message
Type:
str
endpoints
Type:
Namespace
extra
Type:
Dict[str, Any]
extra_evaluated
Type:
Dict[str, Any]
form_class
Type:
Type[iommi.form.Form]
h_tag
Type:
Union[iommi.fragment.Fragment, str]
header
include
Type:
bool
initial_rows
invalid_form_message
Type:
str
iommi_style
Type:
str
member_class
model
Type:
Type[django.db.models.base.Model]
outer
Type: Fragment
page_class
Type:
Type[iommi.page.Page]
page_size
Type:
int
post_bulk_edit
preprocess_row
preprocess_rows
query_class
Type:
Type[iommi.query.Query]
query_from_indexes
Type:
bool
row
Type:
RowConfig
sortable
set this to
False
to turn off sorting for all columnsType:
bool
HOWTO: How do I turn off sorting? (on a column or table wide)
superheader
Type:
Namespace
tag
Type:
str
tbody
Type: Fragment
template
Type:
Union[str, iommi._web_compat.Template]
title
Type:
str
Defaults¶
actions_below
False
actions_template
iommi/form/actions.html
bulk__title
Bulk change
bulk_container__call_target
iommi.fragment.Fragment
cell__tag
td
container__attrs__class
{'iommi-table-container': True}
container__call_target
iommi.fragment.Fragment
container__children__text__template
iommi/table/table_container.html
container__tag
div
h_tag__call_target
iommi.fragment.Header
header__template
iommi/table/table_header_rows.html
outer__call_target
iommi.fragment.Fragment
page_size
40
row__attrs__data-pk
lambda row, **_: getattr(row, 'pk', None)}
row__tag
tr
row__template
None
sortable
True
superheader__attrs__class__superheader
True
superheader__template
iommi/table/header.html
tag
table
tbody__call_target
iommi.fragment.Fragment
tbody__tag
tbody
template
iommi/table/table.html