Задать вопрос

Тел: +7 965 3737 888

404

Просмотров

0

Ответов

DefaultValueWidget

Can be used if a form field should not be editable, but the current value or the value that will be automatically used should still be visible to the user.

init takes two additional parameters: value is the actual value to be used when saving the form, while display determines what is shown to the user when rendering. If display is not specified, value itself will be used instead.

If display is a ModelChoiceField, value is assumed to be a primary key of the model, and the widget will automatically try to retrieve and use the string representation of the corresponding item.

Вопрос полезен? Да0/Нет0
file_5060.py(964.0б)
None