Tweaked display names for Racks, VLANs

This commit is contained in:
Jeremy Stretch
2016-06-22 17:12:12 -04:00
parent dea3ca187a
commit 85a50c67de
5 changed files with 9 additions and 8 deletions

View File

@@ -140,7 +140,8 @@ class PrefixForm(forms.ModelForm, BootstrapMixin):
site = forms.ModelChoiceField(queryset=Site.objects.all(), required=False, label='Site',
widget=forms.Select(attrs={'filter-for': 'vlan'}))
vlan = forms.ModelChoiceField(queryset=VLAN.objects.all(), required=False, label='VLAN',
widget=APISelect(api_url='/api/ipam/vlans/?site_id={{site}}'))
widget=APISelect(api_url='/api/ipam/vlans/?site_id={{site}}',
display_field='display_name'))
class Meta:
model = Prefix