from django.contrib import admin

from .models import Question, Answer, UserAnswer


class AnswerTabularInline(admin.TabularInline):
    model = Answer
    extra = 1


class QuestionAdmin(admin.ModelAdmin):
    inlines = [AnswerTabularInline]

    class Meta:
        model = Question

admin.site.register(Question, QuestionAdmin)

admin.site.register(Answer)

admin.site.register(UserAnswer)
