mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #5375: Add 'speed' attribute to console port models
This commit is contained in:
@@ -24,6 +24,7 @@ __all__ = (
|
||||
'CSVContentTypeField',
|
||||
'CSVDataField',
|
||||
'CSVModelChoiceField',
|
||||
'CSVTypedChoiceField',
|
||||
'DynamicModelChoiceField',
|
||||
'DynamicModelMultipleChoiceField',
|
||||
'ExpandableIPAddressField',
|
||||
@@ -125,6 +126,10 @@ class CSVChoiceField(forms.ChoiceField):
|
||||
self.choices = unpack_grouped_choices(choices)
|
||||
|
||||
|
||||
class CSVTypedChoiceField(forms.TypedChoiceField):
|
||||
STATIC_CHOICES = True
|
||||
|
||||
|
||||
class CSVModelChoiceField(forms.ModelChoiceField):
|
||||
"""
|
||||
Provides additional validation for model choices entered as CSV data.
|
||||
|
Reference in New Issue
Block a user