nautobot.apps.tables
¶
Utilities for apps to implement data tables.
nautobot.apps.tables.BaseTable
¶
Bases: tables.Table
Default table for object lists
:param user: Personalize table display for the given user (optional). Has no effect if AnonymousUser is passed.
Source code in nautobot/utilities/tables.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|
nautobot.apps.tables.BooleanColumn
¶
Bases: tables.Column
Custom implementation of BooleanColumn to render a nicely-formatted checkmark or X icon instead of a Unicode character.
Source code in nautobot/utilities/tables.py
nautobot.apps.tables.ButtonsColumn
¶
Bases: tables.TemplateColumn
Render edit, delete, and changelog buttons for an object.
:param model: Model class to use for calculating URL view names :param prepend_template: Additional template content to render in the column (optional) :param return_url_extra: String to append to the return URL (e.g. for specifying a tab) (optional)
Source code in nautobot/utilities/tables.py
nautobot.apps.tables.ColoredLabelColumn
¶
Bases: tables.TemplateColumn
Render a colored label (e.g. for DeviceRoles).
Source code in nautobot/utilities/tables.py
nautobot.apps.tables.ContentTypesColumn
¶
Bases: tables.ManyToManyColumn
Display a list of content_types
m2m assigned to an object.
Default sorting of content-types is by pk. This sorting comes at a per-row
performance hit to querysets for table views. If this becomes an issue,
set sort_items=False
.
:param sort_items: Whether to sort by (app_label, name)
. (default: True)
:param truncate_words:
Number of words at which to truncate, or None
to disable. (default: None)
Source code in nautobot/utilities/tables.py
nautobot.apps.tables.StatusTableMixin
¶
nautobot.apps.tables.TagColumn
¶
Bases: tables.TemplateColumn
Display a list of tags assigned to the object.
Source code in nautobot/utilities/tables.py
nautobot.apps.tables.ToggleColumn
¶
Bases: tables.CheckBoxColumn
Extend CheckBoxColumn to add a "toggle all" checkbox in the column header.