From d4e012b9e3fe2009a5f6b3053e4f5b3e7371af51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Sat, 7 Oct 2017 00:36:29 +0000 Subject: [PATCH] =?UTF-8?q?R=C3=A9ordonne=20les=20fields=20pour=20plus=20d?= =?UTF-8?q?e=20coh=C3=A9rence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machines/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/machines/forms.py b/machines/forms.py index 5c8aef37..c25ed1f3 100644 --- a/machines/forms.py +++ b/machines/forms.py @@ -52,7 +52,7 @@ class BaseEditMachineForm(EditMachineForm): class EditInterfaceForm(ModelForm): class Meta: model = Interface - fields = '__all__' + fields = ['machine', 'type', 'ipv4', 'mac_address', 'details'] def __init__(self, *args, **kwargs): super(EditInterfaceForm, self).__init__(*args, **kwargs) @@ -83,11 +83,11 @@ class AddInterfaceForm(EditInterfaceForm): class NewInterfaceForm(EditInterfaceForm): class Meta(EditInterfaceForm.Meta): - fields = ['mac_address','type','details'] + fields = ['type','mac_address','details'] class BaseEditInterfaceForm(EditInterfaceForm): class Meta(EditInterfaceForm.Meta): - fields = ['ipv4','mac_address','type','details'] + fields = ['type','ipv4','mac_address','details'] def __init__(self, *args, **kwargs): infra = kwargs.pop('infra')