mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-26 14:42:25 +00:00
Opti les requètes sur chargement de l'edition d'un switch
This commit is contained in:
parent
f554efda87
commit
ac0a76272d
1 changed files with 2 additions and 0 deletions
|
@ -105,6 +105,8 @@ class EditSwitchForm(ModelForm):
|
|||
def __init__(self, *args, **kwargs):
|
||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||
super(EditSwitchForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||
self.fields['switch_interface'].queryset = Interface.objects.all()\
|
||||
.select_related('domain__extension')
|
||||
self.fields['location'].label = 'Localisation'
|
||||
self.fields['number'].label = 'Nombre de ports'
|
||||
|
||||
|
|
Loading…
Reference in a new issue