2016-07-03 03:12:41 +02:00
|
|
|
|
|
|
|
from django.contrib import admin
|
|
|
|
|
2016-07-03 14:02:46 +02:00
|
|
|
from .models import Port, Room, Switch
|
2016-07-03 03:12:41 +02:00
|
|
|
|
2016-07-03 14:02:46 +02:00
|
|
|
class SwitchAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('building','number','details')
|
2016-07-03 03:12:41 +02:00
|
|
|
|
2016-07-03 14:02:46 +02:00
|
|
|
class PortAdmin(admin.ModelAdmin):
|
2016-07-06 12:23:45 +02:00
|
|
|
list_display = ('switch', 'port','room','machine_interface','details')
|
2016-07-03 03:12:41 +02:00
|
|
|
|
|
|
|
class RoomAdmin(admin.ModelAdmin):
|
2016-07-04 23:54:21 +02:00
|
|
|
list_display = ('name',)
|
2016-07-03 03:12:41 +02:00
|
|
|
|
|
|
|
admin.site.register(Port, PortAdmin)
|
|
|
|
admin.site.register(Room, RoomAdmin)
|
2016-07-03 14:02:46 +02:00
|
|
|
admin.site.register(Switch, SwitchAdmin)
|