1 from django.contrib import admin
3 from quiz.models import Quiz, Question, Result, Answer
6 class AnswerInline(admin.TabularInline):
12 class QuestionAdmin(admin.ModelAdmin):
13 inlines = [AnswerInline]
14 list_display = ['title', 'quiz']
17 class ResultAdmin(admin.ModelAdmin):
18 list_display = ['title', 'quiz']
21 class QuizAdmin(admin.ModelAdmin):
22 list_display = ['name']
26 admin.site.register(Question, QuestionAdmin)
27 admin.site.register(Result, ResultAdmin)
28 admin.site.register(Quiz, QuizAdmin)