diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-12-01 19:26:51 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-12-01 19:26:51 +0000 |
| commit | 5e06c129c6c4e615c6ef10b930aa825ce978adb7 (patch) | |
| tree | 4eb8825f178ce2381f4ed5f536a4b10a79d15af5 /docs | |
| parent | bbc3a955573c8e53dcc6d314ed1bd364a49d31b5 (diff) | |
Edited docs/newforms.txt changes from [6733]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6802 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/newforms.txt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/newforms.txt b/docs/newforms.txt index f26afcb6db..737d431ccb 100644 --- a/docs/newforms.txt +++ b/docs/newforms.txt @@ -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. |
