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']
        }

[((243, 287), 'django.forms.TextInput', 'TextInput', ([], {'attrs': "{'placeholder': 'username'}"}), "(attrs={'placeholder': 'username'})\n", (252, 287), False, 'from django.forms import TextInput\n'), ((364, 410), 'django.forms.TextInput', 'TextInput', ([], {'attrs': "{'placeholder': 'first name'}"}), "(attrs={'placeholder': 'first name'})\n", (373, 410), False, 'from django.forms import TextInput\n'), ((486, 531), 'django.forms.TextInput', 'TextInput', ([], {'attrs': "{'placeholder': 'last name'}"}), "(attrs={'placeholder': 'last name'})\n", (495, 531), False, 'from django.forms import TextInput\n'), ((603, 644), 'django.forms.TextInput', 'TextInput', ([], {'attrs': "{'placeholder': 'email'}"}), "(attrs={'placeholder': 'email'})\n", (612, 644), False, 'from django.forms import TextInput\n')]