Commit 1a134e31 authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root

Et permet l'edition...

parent bd224645
...@@ -29,16 +29,16 @@ from reversion.admin import VersionAdmin ...@@ -29,16 +29,16 @@ from reversion.admin import VersionAdmin
from .models import Port, Room, Switch, Stack from .models import Port, Room, Switch, Stack
class StackAdmin(VersionAdmin): class StackAdmin(VersionAdmin):
list_display = ('name', 'stack_id', 'details') pass
class SwitchAdmin(VersionAdmin): class SwitchAdmin(VersionAdmin):
list_display = ('switch_interface','location','number','details') pass
class PortAdmin(VersionAdmin): class PortAdmin(VersionAdmin):
list_display = ('switch', 'port','room','machine_interface','radius','details') pass
class RoomAdmin(VersionAdmin): class RoomAdmin(VersionAdmin):
list_display = ('name','details') pass
admin.site.register(Port, PortAdmin) admin.site.register(Port, PortAdmin)
admin.site.register(Room, RoomAdmin) admin.site.register(Room, RoomAdmin)
......
...@@ -33,7 +33,7 @@ class PortForm(ModelForm): ...@@ -33,7 +33,7 @@ class PortForm(ModelForm):
class EditPortForm(ModelForm): class EditPortForm(ModelForm):
class Meta(PortForm.Meta): 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): def __init__(self, *args, **kwargs):
super(EditPortForm, self).__init__(*args, **kwargs) super(EditPortForm, self).__init__(*args, **kwargs)
...@@ -42,7 +42,7 @@ class EditPortForm(ModelForm): ...@@ -42,7 +42,7 @@ class EditPortForm(ModelForm):
class AddPortForm(ModelForm): class AddPortForm(ModelForm):
class Meta(PortForm.Meta): 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 StackForm(ModelForm):
class Meta: class Meta:
......
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