2016-07-03 01:12:41 +00:00
|
|
|
|
|
|
|
from django.contrib import admin
|
2016-07-21 00:30:36 +00:00
|
|
|
from reversion.admin import VersionAdmin
|
2016-07-03 01:12:41 +00:00
|
|
|
|
2016-07-03 12:02:46 +00:00
|
|
|
from .models import Port, Room, Switch
|
2016-07-03 01:12:41 +00:00
|
|
|
|
2016-07-21 00:30:36 +00:00
|
|
|
class SwitchAdmin(VersionAdmin):
|
2016-10-26 12:05:40 +00:00
|
|
|
list_display = ('switch_interface','location','number','details')
|
2016-07-03 01:12:41 +00:00
|
|
|
|
2016-07-21 00:30:36 +00:00
|
|
|
class PortAdmin(VersionAdmin):
|
2016-12-08 04:43:16 +00:00
|
|
|
list_display = ('switch', 'port','room','machine_interface','radius','details')
|
2016-07-03 01:12:41 +00:00
|
|
|
|
2016-07-21 00:30:36 +00:00
|
|
|
class RoomAdmin(VersionAdmin):
|
2016-07-19 00:30:52 +00:00
|
|
|
list_display = ('name','details')
|
2016-07-03 01:12:41 +00:00
|
|
|
|
|
|
|
admin.site.register(Port, PortAdmin)
|
|
|
|
admin.site.register(Room, RoomAdmin)
|
2016-07-03 12:02:46 +00:00
|
|
|
admin.site.register(Switch, SwitchAdmin)
|