cmsmanage/doorcontrol/admin.py
Adam Goldsmith a6c531c22f Add doorcontrol app for managing HID door controllers
Just read-only access to the event log dump for now
2023-04-03 16:15:20 -04:00

20 lines
568 B
Python

from django.contrib import admin
from .models import HIDEvent
@admin.register(HIDEvent)
class HIDEventAdmin(admin.ModelAdmin):
search_fields = ["description", "forename", "surname", "cardholder_id"]
list_display = ["door_name", "timestamp", "event_type", "description", "is_red"]
list_filter = ["door_name", "event_type"]
def has_add_permission(self, request, obj=None):
return False
def has_change_permission(self, request, obj=None):
return False
def has_delete_permission(self, request, obj=None):
return False