21 lines
503 B
Python
21 lines
503 B
Python
from django.contrib import admin
|
|
|
|
from .models import BoardSession
|
|
|
|
|
|
@admin.register(BoardSession)
|
|
class BoardSessionAdmin(admin.ModelAdmin):
|
|
list_display = (
|
|
"code",
|
|
"mode",
|
|
"host",
|
|
"guest",
|
|
"status",
|
|
"guest_score",
|
|
"created_at",
|
|
)
|
|
list_filter = ("mode", "status")
|
|
search_fields = ("code", "host__username", "guest__username")
|
|
readonly_fields = ("code", "target", "created_at", "completed_at")
|
|
ordering = ("-created_at",)
|