Answer the question
In order to leave comments, you need to log in
How to get "display" value in Django-filter?
The model has a CharField using choices defined:
CHANGE = (
('1', '1 смена'),
('2', '2 смена'),
('3', '3 смена'),
)
change = models.CharField(verbose_name='Смена', max_length=20, choices=CHANGE)
class StateFilter(django_filters.FilterSet):
class Meta:
model = State
fields = ['change']
change = django_filters.AllValuesMultipleFilter(
field_name = 'change',
widget = forms.CheckboxSelectMultiple,
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question