1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

27 lines
698 B
Python
Raw Normal View History

2016-03-01 11:23:03 -05:00
from django.contrib import admin
from .models import Graph, ExportTemplate, TopologyMap, UserAction
2016-03-01 11:23:03 -05:00
@admin.register(Graph)
class GraphAdmin(admin.ModelAdmin):
list_display = ['name', 'type', 'weight', 'source']
@admin.register(ExportTemplate)
class ExportTemplateAdmin(admin.ModelAdmin):
list_display = ['content_type', 'name', 'mime_type', 'file_extension']
2016-04-08 14:57:54 -04:00
@admin.register(TopologyMap)
class TopologyMapAdmin(admin.ModelAdmin):
list_display = ['name', 'slug', 'site']
prepopulated_fields = {
'slug': ['name'],
}
@admin.register(UserAction)
class UserActionAdmin(admin.ModelAdmin):
list_display = ['user', 'action', 'content_type', 'object_id', 'message']