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

Introduce SelectSpeedWidget

This commit is contained in:
Jeremy Stretch
2021-02-25 11:47:26 -05:00
parent 3208c8317d
commit 992657cbe0
3 changed files with 34 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ __all__ = (
'DatePicker',
'DateTimePicker',
'NumericArrayField',
'SelectSpeedWidget',
'SelectWithDisabled',
'SelectWithPK',
'SlugWidget',
@@ -111,6 +112,13 @@ class ContentTypeSelect(StaticSelect2):
option_template_name = 'widgets/select_contenttype.html'
class SelectSpeedWidget(forms.NumberInput):
"""
Speed field with dropdown selections for convenience.
"""
template_name = 'widgets/select_speed.html'
class NumericArrayField(SimpleArrayField):
def to_python(self, value):