mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Closes #6588: Add support for webp files as front/rear device type images
This commit is contained in:
parent
6a6b0236a9
commit
685e0ce00d
@ -7,6 +7,7 @@
|
|||||||
* [#6455](https://github.com/netbox-community/netbox/issues/6455) - Permit /32 IPv4 and /128 IPv6 prefixes
|
* [#6455](https://github.com/netbox-community/netbox/issues/6455) - Permit /32 IPv4 and /128 IPv6 prefixes
|
||||||
* [#6493](https://github.com/netbox-community/netbox/issues/6493) - Show change log diff for non-atomic (pre-2.11) changes
|
* [#6493](https://github.com/netbox-community/netbox/issues/6493) - Show change log diff for non-atomic (pre-2.11) changes
|
||||||
* [#6564](https://github.com/netbox-community/netbox/issues/6564) - Add N connector type for pass-through ports
|
* [#6564](https://github.com/netbox-community/netbox/issues/6564) - Add N connector type for pass-through ports
|
||||||
|
* [#6588](https://github.com/netbox-community/netbox/issues/6588) - Add support for webp files as front/rear device type images
|
||||||
* [#6589](https://github.com/netbox-community/netbox/issues/6589) - Standardize breadcrumb navigation for power panels and feeds
|
* [#6589](https://github.com/netbox-community/netbox/issues/6589) - Standardize breadcrumb navigation for power panels and feeds
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
@ -2,6 +2,9 @@ from django.db.models import Q
|
|||||||
|
|
||||||
from .choices import InterfaceTypeChoices
|
from .choices import InterfaceTypeChoices
|
||||||
|
|
||||||
|
# Exclude SVG images (unsupported by PIL)
|
||||||
|
DEVICETYPE_IMAGE_FORMATS = 'image/bmp,image/gif,image/jpeg,image/png,image/tiff,image/webp'
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Racks
|
# Racks
|
||||||
|
@ -1172,12 +1172,11 @@ class DeviceTypeForm(BootstrapMixin, CustomFieldModelForm):
|
|||||||
)
|
)
|
||||||
widgets = {
|
widgets = {
|
||||||
'subdevice_role': StaticSelect2(),
|
'subdevice_role': StaticSelect2(),
|
||||||
# Exclude SVG images (unsupported by PIL)
|
|
||||||
'front_image': forms.ClearableFileInput(attrs={
|
'front_image': forms.ClearableFileInput(attrs={
|
||||||
'accept': 'image/bmp,image/gif,image/jpeg,image/png,image/tiff'
|
'accept': DEVICETYPE_IMAGE_FORMATS
|
||||||
}),
|
}),
|
||||||
'rear_image': forms.ClearableFileInput(attrs={
|
'rear_image': forms.ClearableFileInput(attrs={
|
||||||
'accept': 'image/bmp,image/gif,image/jpeg,image/png,image/tiff'
|
'accept': DEVICETYPE_IMAGE_FORMATS
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user