Commit e4b02bfa authored by Gabriel Detraz's avatar Gabriel Detraz Committed by Simon Brélivet

Class les ports dans l'ordre

parent ff18296c
......@@ -10,6 +10,10 @@ class EditPortForm(ModelForm):
class Meta(PortForm.Meta):
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 Meta(PortForm.Meta):
fields = ['port', 'room', 'machine_interface', 'related', 'details']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment