mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 20:03:11 +00:00
Opti les requètes sur chargement de l'edition d'un switch
This commit is contained in:
parent
e99d095640
commit
c1a24fa155
1 changed files with 2 additions and 0 deletions
|
@ -105,6 +105,8 @@ class EditSwitchForm(ModelForm):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||||
super(EditSwitchForm, self).__init__(*args, prefix=prefix, **kwargs)
|
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['location'].label = 'Localisation'
|
||||||
self.fields['number'].label = 'Nombre de ports'
|
self.fields['number'].label = 'Nombre de ports'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue