Skip to content

ModelInfoFilter ​

Properties ​

NameTypeRequiredDefaultDescription
labelstringyesDisplayed name of the filter.
type_dbstringyes
type_modelstringyes
type_filterstringyesThe filter input type. Usually the django-filter form field class; value-derived filters use AllValuesChoiceField or AllValuesMultipleChoiceField.
lookup_exprsstring[]yes
requiredbooleanyes
hiddenbooleanyesWhether the filter's widget is hidden.
choicesobject[] | booleanyes
app_labelstringnoIf "choices" is true, this will be in the results, because you need it to get the choices with List field choices.
modelstringnoIf "choices" is true, this will be in the results, because you need it to get the choices with List field choices.
filterset_namestringnoFilterset class that serves the choices.
help_textstringno
max_valuenumber | stringno
min_valuenumber | stringno
max_lengthintegerno
min_lengthintegerno
max_digitsintegerno
decimal_placesintegerno
stepnumber | stringno
empty_labelstringno
empty_valueobjectno
null_labelstringno
null_valueobjectno
error_messagesmap<string, string>noError messages keyed by code.
input_formatsstring[]no
input_typestringnoHTML input type of the filter's widget.
suffixesstring[]noSuffixes appended to the filter name.
validatorsModelInfoFilterValidator[]no