from django.contrib import admin
from .models import Questionnaire, Department, QuestionSet, Question, Response, AnswerBase, AnswerText, AnswerRadio, AnswerSelect, AnswerSelectMultiple, AnswerInteger


# Register your models here.

class AnswerBaseInline(admin.StackedInline):
    fields = ("question", "body")
    # readonly_fields = ("question")
    extra = 0


class AnswerTextInline(AnswerBaseInline):
    model = AnswerText


class AnswerRadioInline(AnswerBaseInline):
    model = AnswerRadio


class AnswerSelectInline(AnswerBaseInline):
    model = AnswerSelect


class AnswerSelectMultipleInline(AnswerBaseInline):
    model = AnswerSelectMultiple


class AnswerIntegerInline(AnswerBaseInline):
    model = AnswerInteger


class ResponseAdmin(admin.ModelAdmin):
    list_display = ("customer_uuid", "customer", "date_created")
    inlines = [AnswerTextInline, AnswerRadioInline, AnswerSelectInline, AnswerSelectMultipleInline, AnswerIntegerInline]
    # specifies the order as well  as which fields to act on
    # readonly_fields = ("department", "date_created", "date_modified", "customer_uuid")


admin.site.register(Department)
admin.site.register(Response, ResponseAdmin)
admin.site.register(Question)
admin.site.register(QuestionSet)
admin.site.register(Questionnaire)
6905f17e4da2fa6615cf0443a31649e9c77061ee
<mask token>


class AnswerTextInline(AnswerBaseInline):
    <mask token>


class AnswerRadioInline(AnswerBaseInline):
    model = AnswerRadio


class AnswerSelectInline(AnswerBaseInline):
    model = AnswerSelect


class AnswerSelectMultipleInline(AnswerBaseInline):
    model = AnswerSelectMultiple


class AnswerIntegerInline(AnswerBaseInline):
    model = AnswerInteger


class ResponseAdmin(admin.ModelAdmin):
    list_display = 'customer_uuid', 'customer', 'date_created'
    inlines = [AnswerTextInline, AnswerRadioInline, AnswerSelectInline,
        AnswerSelectMultipleInline, AnswerIntegerInline]


<mask token>

<mask token>


class AnswerTextInline(AnswerBaseInline):
    model = AnswerText


class AnswerRadioInline(AnswerBaseInline):
    model = AnswerRadio


class AnswerSelectInline(AnswerBaseInline):
    model = AnswerSelect


class AnswerSelectMultipleInline(AnswerBaseInline):
    model = AnswerSelectMultiple


class AnswerIntegerInline(AnswerBaseInline):
    model = AnswerInteger


class ResponseAdmin(admin.ModelAdmin):
    list_display = 'customer_uuid', 'customer', 'date_created'
    inlines = [AnswerTextInline, AnswerRadioInline, AnswerSelectInline,
        AnswerSelectMultipleInline, AnswerIntegerInline]


<mask token>

<mask token>


class AnswerBaseInline(admin.StackedInline):
    fields = 'question', 'body'
    extra = 0


class AnswerTextInline(AnswerBaseInline):
    model = AnswerText


class AnswerRadioInline(AnswerBaseInline):
    model = AnswerRadio


class AnswerSelectInline(AnswerBaseInline):
    model = AnswerSelect


class AnswerSelectMultipleInline(AnswerBaseInline):
    model = AnswerSelectMultiple


class AnswerIntegerInline(AnswerBaseInline):
    model = AnswerInteger


class ResponseAdmin(admin.ModelAdmin):
    list_display = 'customer_uuid', 'customer', 'date_created'
    inlines = [AnswerTextInline, AnswerRadioInline, AnswerSelectInline,
        AnswerSelectMultipleInline, AnswerIntegerInline]


<mask token>

<mask token>


class AnswerBaseInline(admin.StackedInline):
    fields = 'question', 'body'
    extra = 0


class AnswerTextInline(AnswerBaseInline):
    model = AnswerText


class AnswerRadioInline(AnswerBaseInline):
    model = AnswerRadio


class AnswerSelectInline(AnswerBaseInline):
    model = AnswerSelect


class AnswerSelectMultipleInline(AnswerBaseInline):
    model = AnswerSelectMultiple


class AnswerIntegerInline(AnswerBaseInline):
    model = AnswerInteger


class ResponseAdmin(admin.ModelAdmin):
    list_display = 'customer_uuid', 'customer', 'date_created'
    inlines = [AnswerTextInline, AnswerRadioInline, AnswerSelectInline,
        AnswerSelectMultipleInline, AnswerIntegerInline]


admin.site.register(Department)
admin.site.register(Response, ResponseAdmin)
admin.site.register(Question)
admin.site.register(QuestionSet)
admin.site.register(Questionnaire)

from django.contrib import admin
from .models import Questionnaire, Department, QuestionSet, Question, Response, AnswerBase, AnswerText, AnswerRadio, AnswerSelect, AnswerSelectMultiple, AnswerInteger


# Register your models here.

class AnswerBaseInline(admin.StackedInline):
    fields = ("question", "body")
    # readonly_fields = ("question")
    extra = 0


class AnswerTextInline(AnswerBaseInline):
    model = AnswerText


class AnswerRadioInline(AnswerBaseInline):
    model = AnswerRadio


class AnswerSelectInline(AnswerBaseInline):
    model = AnswerSelect


class AnswerSelectMultipleInline(AnswerBaseInline):
    model = AnswerSelectMultiple


class AnswerIntegerInline(AnswerBaseInline):
    model = AnswerInteger


class ResponseAdmin(admin.ModelAdmin):
    list_display = ("customer_uuid", "customer", "date_created")
    inlines = [AnswerTextInline, AnswerRadioInline, AnswerSelectInline, AnswerSelectMultipleInline, AnswerIntegerInline]
    # specifies the order as well  as which fields to act on
    # readonly_fields = ("department", "date_created", "date_modified", "customer_uuid")


admin.site.register(Department)
admin.site.register(Response, ResponseAdmin)
admin.site.register(Question)
admin.site.register(QuestionSet)
admin.site.register(Questionnaire)