Skip to content

ModelInfoField ​

Properties ​

NameTypeRequiredDefaultDescription
labelstringyesDisplayed name of the field.
type_dbstringyesDatabase field type, or null without a column.
type_modelstringyesDjango model field type, or null without a model field.
type_serializerstringyesDjango REST framework serializer field class name.
manybooleanyesWhether the value is a list.
read_onlybooleanyes
requiredbooleanyesWhether a value is required on submit.
hiddenbooleanyesWhether the serializer field sets style={'hidden': True}.
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.
list_defaultbooleannoPresent when the serializer field sets style={'list_default': ...}.
pkbooleannoPresent, and true, on the primary key field.
help_textstringno
max_valuenumber | stringno
min_valuenumber | stringno
max_lengthintegerno
min_lengthintegerno
max_digitsintegerno
decimal_placesintegerno
display_choicesModelInfoChoice[]noLabels for read-only display, from field_display_choices.