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

Merge branch 'develop' into develop-2.9

This commit is contained in:
Jeremy Stretch
2020-08-13 10:06:03 -04:00
6 changed files with 60 additions and 11 deletions

View File

@ -34,6 +34,7 @@ __all__ = [
'IPAddressVar',
'IPAddressWithMaskVar',
'IPNetworkVar',
'MultiChoiceVar',
'MultiObjectVar',
'ObjectVar',
'Script',
@ -167,6 +168,13 @@ class ChoiceVar(ScriptVariable):
self.field_attrs['choices'] = choices
class MultiChoiceVar(ChoiceVar):
"""
Like ChoiceVar, but allows for the selection of multiple choices.
"""
form_field = forms.MultipleChoiceField
class ObjectVar(ScriptVariable):
"""
A single object within NetBox.