mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-08-20 06:03:40 +00:00
Et permet l'edition...
This commit is contained in:
parent
bd22464547
commit
1a134e31ae
2 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue