# coding=utf-8
import django_filters

from .models import ErrorBook


class ErrorBookFilter(django_filters.FilterSet):
    subject = django_filters.CharFilter(field_name='question__chapter__subject_id')
    sort = django_filters.OrderingFilter(fields=('last_time', 'question__chapter__subject_id', ))

    class Meta:
        model = ErrorBook
        fields = "__all__"
