mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-27 15:12:25 +00:00
Opti l'ajout de port
This commit is contained in:
parent
c1a24fa155
commit
4adc6e8fc8
1 changed files with 5 additions and 0 deletions
|
@ -82,6 +82,11 @@ class AddPortForm(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(AddPortForm, self).__init__(*args, prefix=prefix, **kwargs)
|
super(AddPortForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||||
|
self.fields['machine_interface'].queryset = Interface.objects.all()\
|
||||||
|
.select_related('domain__extension')
|
||||||
|
self.fields['related'].queryset = Port.objects.all()\
|
||||||
|
.select_related('switch__switch_interface__domain__extension')\
|
||||||
|
.order_by('switch', 'port')
|
||||||
|
|
||||||
|
|
||||||
class StackForm(ModelForm):
|
class StackForm(ModelForm):
|
||||||
|
|
Loading…
Reference in a new issue