mirror of
https://github.com/daniviga/bite.git
synced 2024-12-24 17:21:25 +01:00
Daniele Viganò
e4a3684951
* Add ntpd server to the stack * Enable NTP updates on Arduino * Fix telemetry when clock is 0
37 lines
891 B
Python
37 lines
891 B
Python
from django.contrib import admin
|
|
from api.models import Device, WhiteList
|
|
|
|
|
|
@admin.register(Device)
|
|
class DeviceAdmin(admin.ModelAdmin):
|
|
readonly_fields = ('creation_time', 'updated_time',)
|
|
list_filter = ('serial',)
|
|
search_fields = ('serial',)
|
|
|
|
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',)
|
|
list_filter = ('serial',)
|
|
search_fields = ('serial',)
|
|
|
|
fieldsets = (
|
|
(None, {
|
|
'fields': ('serial', 'is_published',)
|
|
}),
|
|
('Audit', {
|
|
'classes': ('collapse',),
|
|
'fields': ('creation_time', 'updated_time',)
|
|
}),
|
|
)
|