import django_filters
from django.forms import TextInput

from src.accounts.models import User
from src.application.models import Quiz, StudentGrade


class UserFilter(django_filters.FilterSet):
    username = django_filters.CharFilter(widget=TextInput(attrs={'placeholder': 'username'}), lookup_expr='icontains')
    first_name = django_filters.CharFilter(widget=TextInput(attrs={'placeholder': 'first name'}), lookup_expr='icontains')
    last_name = django_filters.CharFilter(widget=TextInput(attrs={'placeholder': 'last name'}), lookup_expr='icontains')
    email = django_filters.CharFilter(widget=TextInput(attrs={'placeholder': 'email'}), lookup_expr='icontains')

    class Meta:
        model = User
        fields = {
            'is_active': ['exact']
        }

[((9, 48, 9, 92), 'django.forms.TextInput', 'TextInput', (), '', False, 'from django.forms import TextInput\n'), ((10, 50, 10, 96), 'django.forms.TextInput', 'TextInput', (), '', False, 'from django.forms import TextInput\n'), ((11, 49, 11, 94), 'django.forms.TextInput', 'TextInput', (), '', False, 'from django.forms import TextInput\n'), ((12, 45, 12, 86), 'django.forms.TextInput', 'TextInput', (), '', False, 'from django.forms import TextInput\n')]