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

Add ModuleBay and ModuleBayTemplate models

This commit is contained in:
jeremystretch
2021-12-17 09:35:57 -05:00
parent 5f9f0e3ed3
commit e529d7fd3b
33 changed files with 1008 additions and 21 deletions

View File

@@ -26,6 +26,7 @@ __all__ = (
'InventoryItemCSVForm',
'LocationCSVForm',
'ManufacturerCSVForm',
'ModuleBayCSVForm',
'PlatformCSVForm',
'PowerFeedCSVForm',
'PowerOutletCSVForm',
@@ -678,6 +679,17 @@ class RearPortCSVForm(CustomFieldModelCSVForm):
}
class ModuleBayCSVForm(CustomFieldModelCSVForm):
device = CSVModelChoiceField(
queryset=Device.objects.all(),
to_field_name='name'
)
class Meta:
model = ModuleBay
fields = ('device', 'name', 'label', 'description')
class DeviceBayCSVForm(CustomFieldModelCSVForm):
device = CSVModelChoiceField(
queryset=Device.objects.all(),