mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed typo in docs/topics/forms/modelforms.txt.
This commit is contained in:
parent
093e6c68b9
commit
a15aba66f2
1 changed files with 3 additions and 4 deletions
|
@ -485,10 +485,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
|
inner ``Meta`` class. This should be a dictionary mapping field names to widget
|
||||||
classes or instances.
|
classes or instances.
|
||||||
|
|
||||||
For example, if you want the a ``CharField`` for the ``name``
|
For example, if you want the ``CharField`` for the ``name`` attribute of
|
||||||
attribute of ``Author`` to be represented by a ``<textarea>`` instead
|
``Author`` to be represented by a ``<textarea>`` instead of its default
|
||||||
of its default ``<input type="text">``, you can override the field's
|
``<input type="text">``, you can override the field's widget::
|
||||||
widget::
|
|
||||||
|
|
||||||
from django.forms import ModelForm, Textarea
|
from django.forms import ModelForm, Textarea
|
||||||
from myapp.models import Author
|
from myapp.models import Author
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue