8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-26 22:52:26 +00:00

Et permet l'edition...

This commit is contained in:
Gabriel Detraz 2017-10-04 03:20:30 +02:00 committed by root
parent 801b998841
commit 753ae0eb32
2 changed files with 6 additions and 6 deletions

View file

@ -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)

View file

@ -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: