1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Convert table config updates to use REST API

This commit is contained in:
Jeremy Stretch
2020-10-21 14:52:50 -04:00
parent 2845dd488e
commit 4de7fcd758
6 changed files with 38 additions and 18 deletions

View File

@ -168,8 +168,14 @@ class TableConfigForm(BootstrapMixin, forms.Form):
)
def __init__(self, table, *args, **kwargs):
self.table = table
super().__init__(*args, **kwargs)
# Initialize columns field based on table attributes
self.fields['columns'].choices = table.configurable_columns
self.fields['columns'].initial = table.visible_columns
@property
def table_name(self):
return self.table.__class__.__name__