cmsmanage/doorcontrol/admin.py

20 lines
568 B
Python
Raw Normal View History

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