# -*- coding: utf-8 -*-

from django.contrib import admin
from cuestionario.models import Pregunta,Eleccion


class EleccionInLine(admin.TabularInline):
    model = Eleccion
    extra = 5
    
class PreguntaAdmin(admin.ModelAdmin):
    inlines = [EleccionInLine]
    list_display = ['cuestionario','realizador','nr','text', 'type','get_choices_admin']
    list_filter = ['type']
    search_fields = ['nr', 'type', 'text']