This commit is contained in:
Holger Sielaff
2024-07-03 21:41:03 +02:00
commit 030d3c8059
45 changed files with 2025 additions and 0 deletions

18
quiz/admin.py Normal file
View File

@@ -0,0 +1,18 @@
from django.contrib import admin
from quiz.models import Quiz, Question
class QuizQuestionInlineAdmin(admin.StackedInline):
model = Question
@admin.register(Quiz)
class QuizAdmin(admin.ModelAdmin):
inlines = (QuizQuestionInlineAdmin,)
list_display = ('name', 'download_urls')
search_fields = (
'name', 'question__question__name', 'question__question__question',
'question__question__awnser', 'question__question__level__value',
'question__question__label_name',
)