1
0

vault backup: 2025-12-26 02:09:22
All checks were successful
Deploy Quartz site to GitHub Pages / build (push) Successful in 2m29s

This commit is contained in:
2025-12-26 02:09:22 +01:00
parent 3fddadfe50
commit 50366b9b9c
288 changed files with 58893 additions and 750 deletions

View File

@@ -0,0 +1,16 @@
from django.contrib import admin
from quiz.models import Course
@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
"""Admin interface for Courses"""
list_display = ['id', 'name', 'code', 'exam_count', 'created_at']
search_fields = ['name', 'code']
readonly_fields = ['created_at']
def exam_count(self, obj):
"""Show number of exams"""
return obj.exams.count()
exam_count.short_description = '# Exams'