Edited docs/newforms.txt changes from [6733]

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6802 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-12-01 19:26:51 +00:00
parent bbc3a95557
commit 5e06c129c6
1 changed files with 8 additions and 6 deletions

View File

@ -1434,7 +1434,7 @@ Also takes the following optional arguments:
The optional argument ``error_message`` is also accepted for backwards
compatibility. The preferred way to provide an error message is to use the
``error_messages`` argument, passing a dictionary with ``'invalid'`` as a key
and the error message as the value.
and the error message as the value.
``TimeField``
~~~~~~~~~~~~~
@ -1873,11 +1873,13 @@ In addition, each generated form field has attributes set as follows:
* If the model field has ``choices`` set, then the form field's ``widget``
will be set to ``Select``, with choices coming from the model field's
``choices``. The choices will normally include the blank choice which is
selected by default. If the field is required, this forces the user to
make a selection. The blank choice will not be included if the model
field has ``blank=False`` and an explicit ``default`` value (the
``default`` value will be initially selected instead).
``choices``.
The choices will include the "blank" choice, which is selected by
default. If the field is required, this forces the user to make a
selection. The blank choice will not be included if the model
field has ``blank=False`` and an explicit ``default`` value, in which
case the ``default`` value will be initially selected instead.
Finally, note that you can override the form field used for a given model
field. See "Overriding the default field types" below.