8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-27 07:02:26 +00:00
re2o/topologie/admin.py

18 lines
464 B
Python
Raw Normal View History

2016-07-03 01:12:41 +00:00
from django.contrib import admin
2016-07-03 12:02:46 +00:00
from .models import Port, Room, Switch
2016-07-03 01:12:41 +00:00
2016-07-03 12:02:46 +00:00
class SwitchAdmin(admin.ModelAdmin):
list_display = ('building','number','details')
2016-07-03 01:12:41 +00:00
2016-07-03 12:02:46 +00:00
class PortAdmin(admin.ModelAdmin):
list_display = ('switch', 'port','room','details')
2016-07-03 01:12:41 +00:00
class RoomAdmin(admin.ModelAdmin):
2016-07-03 12:02:46 +00:00
list_display = ('building','room','number','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)