1
0
mirror of https://github.com/daniviga/bite.git synced 2024-11-23 13:26:14 +01:00
bite/freedcs/api/admin.py

33 lines
767 B
Python
Raw Normal View History

2020-06-02 00:57:20 +02:00
from django.contrib import admin
from api.models import Device, WhiteList
@admin.register(Device)
class DeviceAdmin(admin.ModelAdmin):
readonly_fields = ('creation_time', 'updated_time',)
fieldsets = (
(None, {
'fields': ('serial', )
}),
('Audit', {
'classes': ('collapse',),
'fields': ('creation_time', 'updated_time',)
}),
)
@admin.register(WhiteList)
class WhiteListAdmin(admin.ModelAdmin):
readonly_fields = ('creation_time', 'updated_time',)
fieldsets = (
(None, {
'fields': ('serial', 'is_published',)
}),
('Audit', {
'classes': ('collapse',),
'fields': ('creation_time', 'updated_time',)
}),
)