from django.contrib import admin
from BaseModels.admin_utils import *
from .models import *

class Admin_QuestionCategory(Admin_BaseIconModel):
    pass
admin.site.register(QuestionCategory, Admin_QuestionCategory)

class Admin_AnswerTabularInline(Admin_BaseIconTabularModel):
    fields = ['name', 'right_answer', 'order']
    model = Answer
    extra = 0

class Admin_Question(Admin_BaseIconModel):
    inlines = [Admin_AnswerTabularInline]
admin.site.register(Question, Admin_Question)

class Admin_Answer(Admin_BaseIconModel):
    pass
admin.site.register(Answer, Admin_Answer)