summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNick Martini <nmartini@orcasinc.com>2012-09-08 12:30:41 -0400
committerNick Martini <nmartini@orcasinc.com>2012-09-08 12:30:41 -0400
commit571698997f0ce3f362ee684754447e2e8a177863 (patch)
tree47479a29cb0cb90ee41d95eea75caad7e77c386e /docs
parentb7d3b057f32ed6aa7ee0941e1f0dec9d3e9223a3 (diff)
fixing modelforms example code, ticket #18832
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/forms/modelforms.txt6
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.