Ticket #13269: 13269_modelform_docs.diff

File 13269_modelform_docs.diff, 875 bytes (added by Gabriel Hurley, 15 years ago)
  • docs/topics/forms/modelforms.txt

     
    376376inner ``Meta`` class. This should be a dictionary mapping field names to widget
    377377classes or instances.
    378378
    379 For example, if you want the a ``CharField`` to be represented by a
    380 ``<textarea>`` instead of its default ``<input type="text">``, you can override
    381 the field's widget::
     379For example, if you want the ``CharField`` for ``name`` on the ``Author``
     380model above to be represented by a ``<textarea>`` instead of its default
     381``<input type="text">``, you can override the field's widget::
    382382
     383    from django.forms import ModelForm, TextArea
     384   
    383385    class AuthorForm(ModelForm):
    384386        class Meta:
    385387            model = Author
Back to Top