auto complete djangofilter

22 views
Skip to first unread message

Dilja E G

unread,
Feb 9, 2022, 8:51:34 AM2/9/22
to Django users
class PlayerFilter(django_filters.FilterSet):
name = django_filters.ModelChoiceFilter(label='Name' ,queryset=Player.objects.all())
team__name = django_filters.ModelChoiceFilter(label='Team',queryset=Team.objects.all() )
team__game__name = django_filters.ModelChoiceFilter(label='Game',queryset=Game.objects.all() )
team__company__name = django_filters.ModelChoiceFilter(label='Company',queryset=Company.objects.all())
class Meta:
model = Player
fields =['name','team__name','team__game__name','team__company__name']
this is my filter , how can i add auto complte filtter ?
and how can i customize style of filtter filds?
Reply all
Reply to author
Forward
0 new messages