Ticket #13269: 13269_modelform_docs.diff
File 13269_modelform_docs.diff, 875 bytes (added by , 15 years ago) |
---|
-
docs/topics/forms/modelforms.txt
376 376 inner ``Meta`` class. This should be a dictionary mapping field names to widget 377 377 classes or instances. 378 378 379 For example, if you want the a ``CharField`` to be represented by a380 ``<textarea>`` instead of its default ``<input type="text">``, you can override 381 the field's widget::379 For example, if you want the ``CharField`` for ``name`` on the ``Author`` 380 model above to be represented by a ``<textarea>`` instead of its default 381 ``<input type="text">``, you can override the field's widget:: 382 382 383 from django.forms import ModelForm, TextArea 384 383 385 class AuthorForm(ModelForm): 384 386 class Meta: 385 387 model = Author