diff options
| author | Tim Graham <timograham@gmail.com> | 2012-09-08 10:34:11 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2012-09-08 10:34:11 -0700 |
| commit | 76bd33539f8a188c4b1770babe6d2b55e5030c68 (patch) | |
| tree | cea9299688fea23d9e5cfc51eabe7ea9808dfe45 /docs | |
| parent | b139cfc0f7e70e37b9a31e9931c6b03b8a68e918 (diff) | |
| parent | 571698997f0ce3f362ee684754447e2e8a177863 (diff) | |
Merge pull request #359 from nmartini/ticket_18832
Fixed #18832 - Updated ModelForm example fields to match note below
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/forms/modelforms.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index 8159c8850c..caff03c581 100644 --- a/docs/topics/forms/modelforms.txt +++ b/docs/topics/forms/modelforms.txt @@ -311,18 +311,18 @@ model fields: to exclude from the form. For example, if you want a form for the ``Author`` model (defined -above) that includes only the ``name`` and ``title`` fields, you would +above) that includes only the ``name`` and ``birth_date`` fields, you would specify ``fields`` or ``exclude`` like this:: class PartialAuthorForm(ModelForm): class Meta: model = Author - fields = ('name', 'title') + fields = ('name', 'birth_date') class PartialAuthorForm(ModelForm): class Meta: model = Author - exclude = ('birth_date',) + exclude = ('title',) Since the Author model has only 3 fields, 'name', 'title', and 'birth_date', the forms above will contain exactly the same fields. |
