# coding=utf-8
import django_filters

from .models import *

class ExamQuestionFilter(django_filters.FilterSet):
    chapter = django_filters.CharFilter(field_name='chapter_id')
    subject = django_filters.CharFilter(field_name='chapter__subject_id')
    type = django_filters.CharFilter(field_name='type')
    title = django_filters.CharFilter(field_name='title', lookup_expr='icontains')

    class Meta:
        model = ExamQuestion
        fields = '__all__'

