TextField missing in django.forms

CharField might be what you are looking for.

EDIT: To clarify, the docs mention TextField as a model field type. You cannot use it as form field. The table that the OP pointed out indicates that a TextField in a model is represented as a CharField (with widget=forms.Textarea) in a corresponding ModelForm. I would imagine, then, that there is no form field with Textarea as its default widget.

If I were to guess why Django made this choice, I would say that having two fields that differ only in the widget they use, not in the type of data being stored, validation, etc. might be considered useless by the people at Django and hence you have to manually change the widget.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)