mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #11766: Remove obsolete custom ChoiceField and MultipleChoiceField classes
This commit is contained in:
@ -165,19 +165,6 @@ In addition to the [form fields provided by Django](https://docs.djangoproject.c
|
||||
options:
|
||||
members: false
|
||||
|
||||
## Choice Fields
|
||||
|
||||
!!! warning "Obsolete Fields"
|
||||
NetBox's custom `ChoiceField` and `MultipleChoiceField` classes are no longer necessary thanks to improvements made to the user interface. Django's native form fields can be used instead. These custom field classes will be removed in NetBox v3.6.
|
||||
|
||||
::: utilities.forms.fields.ChoiceField
|
||||
options:
|
||||
members: false
|
||||
|
||||
::: utilities.forms.fields.MultipleChoiceField
|
||||
options:
|
||||
members: false
|
||||
|
||||
## Dynamic Object Fields
|
||||
|
||||
::: utilities.forms.fields.DynamicModelChoiceField
|
||||
|
7
docs/release-notes/version-3.6.md
Normal file
7
docs/release-notes/version-3.6.md
Normal file
@ -0,0 +1,7 @@
|
||||
# NetBox v3.6
|
||||
|
||||
## v3.6.0 (FUTURE)
|
||||
|
||||
### Other Changes
|
||||
|
||||
* [#11766](https://github.com/netbox-community/netbox/issues/11766) - Remove obsolete custom `ChoiceField` and `MultipleChoiceField` classes
|
@ -273,6 +273,7 @@ nav:
|
||||
- git Cheat Sheet: 'development/git-cheat-sheet.md'
|
||||
- Release Notes:
|
||||
- Summary: 'release-notes/index.md'
|
||||
- Version 3.6: 'release-notes/version-3.6.md'
|
||||
- Version 3.5: 'release-notes/version-3.5.md'
|
||||
- Version 3.4: 'release-notes/version-3.4.md'
|
||||
- Version 3.3: 'release-notes/version-3.3.md'
|
||||
|
@ -11,13 +11,11 @@ from utilities.forms import widgets
|
||||
from utilities.validators import EnhancedURLValidator
|
||||
|
||||
__all__ = (
|
||||
'ChoiceField',
|
||||
'ColorField',
|
||||
'CommentField',
|
||||
'JSONField',
|
||||
'LaxURLField',
|
||||
'MACAddressField',
|
||||
'MultipleChoiceField',
|
||||
'SlugField',
|
||||
'TagFilterField',
|
||||
)
|
||||
@ -128,24 +126,3 @@ class MACAddressField(forms.Field):
|
||||
raise forms.ValidationError(self.error_messages['invalid'], code='invalid')
|
||||
|
||||
return value
|
||||
|
||||
|
||||
#
|
||||
# Choice fields
|
||||
#
|
||||
|
||||
class ChoiceField(forms.ChoiceField):
|
||||
"""
|
||||
Previously used to override Django's built-in `ChoiceField` to use NetBox's now-obsolete `StaticSelect` widget.
|
||||
"""
|
||||
# TODO: Remove in v3.6
|
||||
pass
|
||||
|
||||
|
||||
class MultipleChoiceField(forms.MultipleChoiceField):
|
||||
"""
|
||||
Previously used to override Django's built-in `MultipleChoiceField` to use NetBox's now-obsolete
|
||||
`StaticSelectMultiple` widget.
|
||||
"""
|
||||
# TODO: Remove in v3.6
|
||||
pass
|
||||
|
Reference in New Issue
Block a user