From 1a134e31aec3ef65b03a15af0a0df40cb3ab5e1b Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Wed, 4 Oct 2017 03:20:30 +0200 Subject: [PATCH] Et permet l'edition... --- topologie/admin.py | 8 ++++---- topologie/forms.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/topologie/admin.py b/topologie/admin.py index d1657330..8dcce849 100644 --- a/topologie/admin.py +++ b/topologie/admin.py @@ -29,16 +29,16 @@ from reversion.admin import VersionAdmin from .models import Port, Room, Switch, Stack class StackAdmin(VersionAdmin): - list_display = ('name', 'stack_id', 'details') + pass class SwitchAdmin(VersionAdmin): - list_display = ('switch_interface','location','number','details') + pass class PortAdmin(VersionAdmin): - list_display = ('switch', 'port','room','machine_interface','radius','details') + pass class RoomAdmin(VersionAdmin): - list_display = ('name','details') + pass admin.site.register(Port, PortAdmin) admin.site.register(Room, RoomAdmin) diff --git a/topologie/forms.py b/topologie/forms.py index 1f826809..87a3917d 100644 --- a/topologie/forms.py +++ b/topologie/forms.py @@ -33,7 +33,7 @@ class PortForm(ModelForm): class EditPortForm(ModelForm): class Meta(PortForm.Meta): - fields = ['room', 'related', 'machine_interface', 'radius', 'details'] + fields = ['room', 'related', 'machine_interface', 'radius', 'vlan_force', 'details'] def __init__(self, *args, **kwargs): super(EditPortForm, self).__init__(*args, **kwargs) @@ -42,7 +42,7 @@ class EditPortForm(ModelForm): class AddPortForm(ModelForm): class Meta(PortForm.Meta): - fields = ['port', 'room', 'machine_interface', 'related', 'radius', 'details'] + fields = ['port', 'room', 'machine_interface', 'related', 'radius', 'vlan_force', 'details'] class StackForm(ModelForm): class Meta: