nautobot.apps.tables
¶
Utilities for apps to implement data tables.
nautobot.apps.tables.BaseTable
¶
Bases: django_tables2.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/core/tables.py
20 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 140 141 142 143 |
|
nautobot.apps.tables.BooleanColumn
¶
Bases: django_tables2.Column
Custom implementation of BooleanColumn to render a nicely-formatted checkmark or X icon instead of a Unicode character.
Source code in nautobot/core/tables.py
nautobot.apps.tables.ButtonsColumn
¶
Bases: django_tables2.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/core/tables.py
nautobot.apps.tables.ChoiceFieldColumn
¶
Bases: django_tables2.Column
Render a ChoiceField value inside a indicating a particular CSS class. This is useful for displaying colored choices. The CSS class is derived by calling .get_FOO_class() on the row record.
Source code in nautobot/core/tables.py
nautobot.apps.tables.ColorColumn
¶
Bases: django_tables2.Column
Display a color (#RRGGBB).
Source code in nautobot/core/tables.py
nautobot.apps.tables.ColoredLabelColumn
¶
Bases: django_tables2.TemplateColumn
Render a colored label (e.g. for DeviceRoles).
Source code in nautobot/core/tables.py
nautobot.apps.tables.ComputedFieldColumn
¶
Bases: django_tables2.Column
Display computed fields in the appropriate format.
Source code in nautobot/core/tables.py
nautobot.apps.tables.ContentTypesColumn
¶
Bases: django_tables2.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/core/tables.py
nautobot.apps.tables.CustomFieldColumn
¶
Bases: django_tables2.Column
Display custom fields in the appropriate format.
Source code in nautobot/core/tables.py
nautobot.apps.tables.LinkedCountColumn
¶
Bases: django_tables2.Column
Render a count of related objects linked to a filtered URL.
:param viewname: The view name to use for URL resolution :param view_kwargs: Additional kwargs to pass for URL resolution (optional) :param url_params: A dict of query parameters to append to the URL (e.g. ?foo=bar) (optional)
Source code in nautobot/core/tables.py
nautobot.apps.tables.RelationshipColumn
¶
Bases: django_tables2.Column
Display relationship association instances in the appropriate format.
Source code in nautobot/core/tables.py
nautobot.apps.tables.RoleTableMixin
¶
nautobot.apps.tables.StatusTableMixin
¶
nautobot.apps.tables.TagColumn
¶
Bases: django_tables2.TemplateColumn
Display a list of tags assigned to the object.
Source code in nautobot/core/tables.py
nautobot.apps.tables.ToggleColumn
¶
Bases: django_tables2.CheckBoxColumn
Extend CheckBoxColumn to add a "toggle all" checkbox in the column header.