mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-26 00:43:46 +00:00
Opti l'ajout de port
This commit is contained in:
parent
ac0a76272d
commit
ae42a06d1c
1 changed files with 5 additions and 0 deletions
|
@ -82,6 +82,11 @@ class AddPortForm(ModelForm):
|
|||
def __init__(self, *args, **kwargs):
|
||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||
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):
|
||||
|
|
Loading…
Reference in a new issue