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

Renamed rack-units API and added a test

This commit is contained in:
Jeremy Stretch
2017-03-20 21:18:37 -04:00
parent 4a2206ecb1
commit f743410b4e
3 changed files with 13 additions and 6 deletions

View File

@ -512,7 +512,7 @@ class DeviceForm(BootstrapMixin, CustomFieldForm):
))
position = forms.TypedChoiceField(required=False, empty_value=None,
help_text="The lowest-numbered unit occupied by the device",
widget=APISelect(api_url='/api/dcim/racks/{{rack}}/rack-units/?face={{face}}',
widget=APISelect(api_url='/api/dcim/racks/{{rack}}/units/?face={{face}}',
disabled_indicator='device'))
manufacturer = forms.ModelChoiceField(queryset=Manufacturer.objects.all(),
widget=forms.Select(attrs={'filter-for': 'device_type'}))