mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Class les ports dans l'ordre
This commit is contained in:
parent
ff18296ccb
commit
e4b02bfaa5
1 changed files with 4 additions and 0 deletions
|
@ -10,6 +10,10 @@ class EditPortForm(ModelForm):
|
||||||
class Meta(PortForm.Meta):
|
class Meta(PortForm.Meta):
|
||||||
fields = ['room', 'machine_interface', 'related', 'details']
|
fields = ['room', 'machine_interface', 'related', 'details']
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(EditPortForm, self).__init__(*args, **kwargs)
|
||||||
|
self.fields['related'].queryset = Port.objects.all().order_by('switch', 'port')
|
||||||
|
|
||||||
class AddPortForm(ModelForm):
|
class AddPortForm(ModelForm):
|
||||||
class Meta(PortForm.Meta):
|
class Meta(PortForm.Meta):
|
||||||
fields = ['port', 'room', 'machine_interface', 'related', 'details']
|
fields = ['port', 'room', 'machine_interface', 'related', 'details']
|
||||||
|
|
Loading…
Reference in a new issue