[1.7.x] Fixed typo in docs/topics/forms/modelforms.txt.

Backport of a15aba66f2 from master
This commit is contained in:
wrwrwr 2014-11-27 16:21:28 +01:00 committed by Tim Graham
parent 8819f6f7c9
commit e3ea5d4dad
1 changed files with 3 additions and 4 deletions

View File

@ -487,10 +487,9 @@ To specify a custom widget for a field, use the ``widgets`` attribute of the
inner ``Meta`` class. This should be a dictionary mapping field names to widget
classes or instances.
For example, if you want the a ``CharField`` for the ``name``
attribute of ``Author`` to be represented by a ``<textarea>`` instead
of its default ``<input type="text">``, you can override the field's
widget::
For example, if you want the ``CharField`` for the ``name`` attribute of
``Author`` to be represented by a ``<textarea>`` instead of its default
``<input type="text">``, you can override the field's widget::
from django.forms import ModelForm, Textarea
from myapp.models import Author